The Prophet ﷺ said, "Allah has accepted my invocation to forgive what whispers in the hearts of my followers, unless they put it to action or utter it." (See Hadith No. 657 Vol. 8) (Using translation from Bukhārī 2528)
"إِنَّ الله تَجَاوَزَ لي عَنْ أُمَّتي مَا وَسْوَسَتْ بِهِ صُدورهُا ما لمْ تعْمَلْ، أَوْ تتكلَّمْ ".