The Messenger of Allah ﷺ said, "Allah continues to face His servant during his prayer as long as he does not turn away. But when he turns his face aside, Allah turns away from him."
أخبرنا سويد بن نصر قال أنبأنا عبد الله بن المبارك عن يونس عن الزهري قال سمعت أبا الأحوص يحدثنا في مجلس سعيد ابن المسيب وابن المسيب جالس أنه سمع
قال رسول الله ﷺ لا يزال الله عز وجل مقبلا على العبد في صلاته ما لم يلتفت فإذا صرف وجهه انصرف عنه
[Its isnad is hasan] Abu Dawud narrated it in the Book of Prayer, chapter on turning during prayer, no. 909, from the hadith of Yunus Ayli through the same route. It is also found in al-Kubra, no. 1118, and part of it was mentioned earlier, no. 1192. Ibn Khuzayma graded it sahih, nos. 481 and 482, as did Hakim, 1/239, and Dhahabi. It also has a corroborating witness in Tirmidhi and elsewhere.