An-Nisaa • EN-TAFSIR-IBN-ABBAS
﴿ إِنَّمَا ٱلتَّوْبَةُ عَلَى ٱللَّهِ لِلَّذِينَ يَعْمَلُونَ ٱلسُّوٓءَ بِجَهَٰلَةٍۢ ثُمَّ يَتُوبُونَ مِن قَرِيبٍۢ فَأُو۟لَٰٓئِكَ يَتُوبُ ٱللَّهُ عَلَيْهِمْ ۗ وَكَانَ ٱللَّهُ عَلِيمًا حَكِيمًۭا ﴾
“Verily, God's acceptance of repentance relates only to those who do evil out of ignorance and then repent before their time runs out: and it is they unto whom God will turn again in His mercy - for God is all-knowing, wise;”
(Allah accepteth the repentance of those who do evil in ignorance) even if they do so purposefully while being ignorant of its respective punishment ((and) then turn quickly (in repentance) to Allah) before being led away for punishment or at the moment of suffering from the pangs of death. (These are they towards whom Allah relenteth) Allah overlooks the sins of these. (Allah is ever Knower) of your repentance, (Wise) by accepting your repentance before death, while does not accept it when one is suffering from the pangs of death or after one dies.