It is permissible to leave to the right or left after finishing the prayer Sahih Muslim 708 b
Translation
Anas reported
The Apostle of Allah (ﷺ) used to turn to the right (at the end of the prayer).