The Prophet ﷺ said: When a man commits fornication, faith departs from him and there is something like a canvas roof over his head; and when he quits that action, faith returns to him. (Using translation from Abū Dāʾūd 4690)
قَالَ رَسُولُ اللَّهِ ﷺ «إِذَا زَنَى الْعَبْدُ خَرَجَ مِنْهُ الْإِيمَانُ وَكَانَ كَالظُّلَّةِ فَإِذَا انْقَلَعَ مِنْهَا رَجَعَ إِلَيْهِ الْإِيمَانُ»