All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
Repenting from sins is an immediate obligation. If the sin is one that takes its perpetrator out of the fold of Islam, then he does not return to Islam until he repents of that sin. Therefore, if a Muslim commits a sin that leads to kufr (disbelief), then he remains a kaafir (disbeliever) until he repents. If he dies before repenting to Allaah of this sin, then he died as a kaafir and accordingly will abide in Hellfire eternally. Such a person bears a grave sin until he turns to Allaah in sincere repentance.
Allaah knows best.