If someone dies while performing an act of obedience then we hope that he will enter paradise, as the Prophet Muhammad (ﷺ) said: “When Allah wants good for a person, He uses him.”
The companions (may Allah be pleased with them) asked: “How does He use him, O Prophet of Allah?”
The Prophet (ﷺ) replied: “He enables him to perform a good deed before his death.” [Ahmad].
The Prophet (ﷺ) also said: “Actions are judged according to their end [i.e. if one performs actions of the dwellers of paradise and then dies, then it is hoped that he will enter paradise, and if one performs the actions of the inmates of Hell and dies, then is subject to entering Hellfire].”
Whoever dies while performing Hajj or when praying or while performing any other good deed, then we hope that he will be among the people of paradise.
However, the belief of Ahlus-Sunnah Wal-Jamaa’ah is that they do not confirm that a specific person is among the people of paradise except the ten companions whom the Prophet (ﷺ) informed that they will enter paradise, and Thabit Ibn Qays Ibn Shammaas, and ‘Ukkaashah Ibn Mihsan, and others whom the Prophet (ﷺ) mentioned by name that they are among the people of paradise. As regards other believers, we cannot be definitely sure that they are among the people of paradise.
Imaam At-Tahaawi (may Allah have mercy upon him) said: ‘It is hoped that Allah will forgive the righteous believers and make them enter paradise with His mercy, but we cannot say with absolute certainty that they are among the people of paradise.’
And Allah Knows best. ❤