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:3:90

Indeed, those who reject the message after their belief and then increase in disbelief - never will their ˹claimed˺ repentance be accepted, and they are the ones astray.  

The following was revealed regarding the Jews: Surely those who disbelieve, in Jesus, after they have believed, in Moses, and then increase in unbelief, in Muhammad (s) — their repentance shall not be accepted, when they are drawing their last gasps of life, or when they have died as disbelievers; those are the ones who go astray.
القرآن:٣:٩٠

إِنَّ الَّذِينَ كَفَرُوا بَعْدَ إِيمَانِهِمْ ثُمَّ ازْدَادُوا كُفْرًا لَنْ تُقْبَلَ تَوْبَتُهُمْ وَأُولَٰئِكَ هُمُ الضَّالُّونَ  

ونزل في اليهود {إن الذين كفروا} بعيسى {بعد إيمانهم} بموسى {ثم ازدادوا كفرا} بمحمد {لن تُقبل توبتهم} إذا غرغروا أو ماتوا كفّارا {وأولئك هم الضالُّون}.