Al-Hashr • EN-TAFSIR-MAARIF-UL-QURAN
﴿ وَلَا تَكُونُوا۟ كَٱلَّذِينَ نَسُوا۟ ٱللَّهَ فَأَنسَىٰهُمْ أَنفُسَهُمْ ۚ أُو۟لَٰٓئِكَ هُمُ ٱلْفَٰسِقُونَ ﴾
“and be not like those who are oblivious of God, and whom He therefore causes to be oblivious of [what is good for] their own selves: [for] it is they, they who are truly depraved!”
فَأَنسَاهُمْ أَنفُسَهُمْ He made them forget their own selves....59:19) It means they did not forget Allah but themselves, because they are unaware of their own loss and gain.