The Messenger of Allah ﷺ said, "Allah continues to face His servant while he is in his prayer as long as he does not turn away. But when he turns away, Allah departs from him."
حدثنا أحمد بن صالح حدثنا ابن وهب قال أخبرني يونس عن ابن شهاب قال سمعت أبا الأحوص يحدثنا في مجلس سعيد بن المسيب قال قال
رسول الله ﷺ لا يزال الله عز وجل مقبلا على العبد وهو في صلاته ما لم يلتفت فإذا التفت انصرف عنه
[Its isnad is hasan]. Nasai reported it in the chapter on Sahw, section on strictness regarding it, hadith 1196, from the hadith of Yunus bin Yazid Ayli, with this chain. Ibn Khuzayma graded it sahih, hadith 481 and 482, as did Hakim, 1/236, and Dhahabi agreed with him.