A person who dies affirming tawḥīd and faith but without repenting of a major sin remains under Allah’s will. Such a believer is not automatically regarded as eternally confined to Hell.
Allah may forgive through grace or punish through justice. The eventual destiny of those who die in tawḥīd must not be confused with that of those who die in disbelief; intercession and mercy are also affirmed in their proper context.
This does not trivialize sin, nor does it justify a definitive sentence of eternal punishment for every sinful believer. Fear and hope both remain.