Dalil

Quran Al-Qasas 28:67

فَأَمَّا مَن تَابَ وَءَامَنَ وَعَمِلَ صَٰلِحٗا فَعَسَىٰٓ أَن يَكُونَ مِنَ ٱلۡمُفۡلِحِينَ

Translation

But as for one who had repented, believed, and done righteousness, it is expected [i.e., promised by Allāh] that he will be among the successful.