"The Messenger of Allah would glance toward the right and the left during Salat but he would not turn his neck to look behind him." (Using translation from Tirmidhī 587)
أَنَّ رَسُولَ اللهِ ﷺ «كَانَ يَلْحَظُ فِي الصَّلَاةِ يَمِينًا وَشِمَالًا لَا يَلْوِي مِنْهُ خَلْفَ ظَهْرِهِ»