It is permissible to leave to the right or left after finishing the prayer Sahih Muslim 707 a

Show Arabic text
Translation
Abdullah reported

None of you should give a share to Satan out of your self. He should not deem that it is necessary for him to turn but to the right only (after prayer). I saw the Messenger of Allah (ﷺ) turning to the left.