Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:20:82

But indeed, I am the Perpetual Forgiver of whoever repents and believes and does righteousness and then continues in guidance.  

And indeed I am Forgiving toward him who repents, from ascribing partners ˹to God˺, and believes, affirms God’s Oneness, and acts righteously, is sincere in ˹performing˺ the obligatory and the supererogatory ˹deeds˺, and then follows guidance’, by adhering to what has been mentioned up to his death.
القرآن:٢٠:٨٢

وَإِنِّي لَغَفَّارٌ لِمَنْ تَابَ وَآمَنَ وَعَمِلَ صَالِحًا ثُمَّ اهْتَدَىٰ  

{وإني لغفار لمن تاب} من الشرك {وآمن} وحَّد الله {وعمل صالحا} يصدق بالفرض والنفل {ثم اهتدى} باستمراره على ما ذكر إلى موته.

See similar narrations below:

Collected by Aḥmad's Zuhd, Suyūṭī
ahmad-zuhd:1502ʿAbdullāh > al-Walīd b. Shujāʿ > Ḍamrah > Ibn Shawdhab

[Machine] Hasan said, "This verse is [And indeed, I am the Perpetual Forgiver of whoever repents and believes and does righteousness and then continues guidance]." [Ta-Ha 82] She said, "I said, 'Oh Lukaa, I don't find anything for you here'."  

الزهد لأحمد:١٥٠٢حَدَّثَنَا عَبْدُ اللَّهِ حَدَّثَنَا الْوَلِيدُ بْنُ شُجَاعٍ حَدَّثَنَا ضَمْرَةُ عَنِ ابْنِ شَوْذَبٍ قَالَ

الْحَسَنُ هَذِهِ الْآيَةُ {وَإِنِّي لَغَفَّارٌ لِمَنْ تَابَ وَآمَنَ وَعَمِلَ صَالِحًا ثُمَّ اهْتَدَى} [طه 82] قَالَ قُلْتُ «يَا لُكَعُ مَا أَجِدُ لَكِ هَاهُنَا شَيْئًا»  

suyuti:20034a
Request/Fix translation

  

السيوطي:٢٠٠٣٤a

"مَكْتُوبٌ حَوْلَ الْعَرْشِ قَبْلَ أَنْ تُخْلَقَ الدُّنْيَا بِأَرْبَعَةِ آلافِ عَامٍ: وإنِّي لَغَفَّارٌ لِمَنْ تَابَ وآمَنَ وَعَمِلَ صَالِحًا ثُمَّ اهْتَدَى".  

الديلمى عن علي