قال الشيخ رحمه الله ومن التفت في صلاة فريضة حتى يرى من خلفه وجب عليه إعادة الصلاة يدل على ذلك
The Shaykh (Al-Mufid), may Allah سبحانه وتعالى support him, said: ‘Whoever turns his head in an obligatory prayer to the extent that he sees what is behind him, it becomes obligatory upon him to repeat the prayer.’ This is supported by:
Commentary #32