The Prophet ﷺ increased in doing istighfār before his passing
The Messenger of Allah ﷺ often would say, "subḥāna Allāhi wa-bi-ḥamdihī, astaghfiru Allāh wa-atūbu ilayhi (Glory be to Allah and with His praise, I seek the forgiveness of Allah and I repent to Him.)"
She said: I asked: Messenger of Allah, I see that you often repeat the saying subḥāna Allāhi wa-bi-ḥamdihī astaghfiru Allāh wa-atūbu ilayhi. He said, "My Lord informed me that I would soon see a sign in my Ummah. So when I see it I often say: subḥāna Allāhi wa-bi-ḥamdihī, astaghfiru Allāh wa-atūbu ilayhi. Indeed I saw it ˹when this āyah˺ was revealed: 'When the Help of Allah and the victory came,' i.e. Conquest of Makkah, 'And you see the people entering into the religion of Allah in multitudes, Then exalt ˹Him˺ with praise of your Lord and ask forgiveness of Him. Indeed, He is ever Accepting of repentance.' (Naṣr 110:1-3"
كَانَ رَسُولُ اللَّهِ ﷺ يُكْثِرُ مِنْ قَوْلِ: «(سُبْحَانَ اللَّهِ وَبِحَمْدِهِ، أَسْتَغْفِرُ اللَّهَ وَأَتُوبُ إِلَيْهِ۔)»
قَالَتْ فَقُلْتُ: يَا رَسُولَ اللَّهِ أَرَاكَ تُكْثِرُ مِنْ قَوْلِ سُبْحَانَ اللَّهِ وَبِحَمْدِهِ أَسْتَغْفِرُ اللَّهَ وَأَتُوبُ إِلَيْهِ۔ فَقَالَ: «خَبَّرَنِي رَبِّي أَنِّي سَأَرَى عَلاَمَةً فِي أُمَّتِي، فَإِذَا رَأَيْتُهَا أَكْثَرْتُ مِنْ قَوْلِ سُبْحَانَ اللَّهِ وَبِحَمْدِهِ أَسْتَغْفِرُ اللَّهَ وَأَتُوبُ إِلَيْهِ، فَقَدْ رَأَيْتُهَا: {إِذَا جَاءَ نَصْرُ اللَّهِ وَالْفَتْحُ} فَتْحُ مَكَّةَ {وَرَأَيْتَ النَّاسَ يَدْخُلُونَ فِي دِينِ اللَّهِ أَفْوَاجًا * فَسَبِّحْ بِحَمْدِ رَبِّكَ وَاسْتَغْفِرْهُ إِنَّهُ كَانَ تَوَّابًا}۔»