The Prophet ﷺ said: Allah, the Most High, continues to turn favourably towards a servant while he is engaged in prayer as long as he does not look to the side (by turning the neck), but if he does so, He turns away from him. (Using translation from Abū Dāʾūd 909)
قَالَ رَسُولُ اللَّهِ ﷺ «لَا يَزَالُ اللَّهُ مُقْبِلًا عَلَى الْعَبْدِ مَا لَمْ يَلْتَفِتْ فَإِذَا صَرَفَ وَجْهَهُ انْصَرَفَ عَنْهُ»