That would be like being judged to hell on a technicality. For someone who does a good job at being a Christian, and happens to die, while they are say, mulling over a forgiveness issue, or didn't get a chance to say their evening prayer asking forgiveness of their sin, to be sent to Hell? That doesn't sound like an understanding God to me.
Part of getting saved is we trust ourselves and control to God, so we do not get into a situation like that. And God changes our wills and our nature so we don't. And even if we could still do some wrong thing, because of not being totally perfect when we die, God can keep control of us so we don't. He is able to have us ready when He knows we really will die.
So, I think it is wise not to glorify ourselves as still having a lot of control if we have trusted control to God and given ourselves to Him >
"for it is God who works in you both to will and to do for His good pleasure." (Philippians 2:13)
If He is working in our wills, we more and more do not have our own will control. He has changed us so it is our nature to will what He wants. We are in union with Him and how He lives and acts through us > 1 Corinthians 6:17, Galatians 2:20.
So, if someone thinks we could sin badly and die but go to Heaven, this idea means the person did not submit oneself and one's control to God. So, it is possible the person never really submitted oneself to Jesus for salvation, in the first place (1 John 2:19). May be the person made certain gestures which others told him or her to do.
But . . . also . . . if someone else is arguing that a child of God can be near one's death sin and not repent, this too would mean the person did not give oneself and one's control over to God.
So, if we have trusted in Jesus, expect Him to change us so it is not our character to get into such a situation. And as ones growing in Christ we will be quite blessedly busy with what is so better . . . instead of spending a lot of time on bad possibilities which do not apply to someone who has given oneself to the LORD.
But we can tend to read a scripture and right away think up problems about what it could mean, instead of submitting to how God is able to do all His word with us, the way He means it