The Messenger of Allah ﷺ said, "Every deceased person has their deeds sealed off, except the one who died stationed at the frontier in the cause of Allah. His deeds continue to grow for him until the Day of Resurrection, and he is kept safe from the trial of the grave."And I heard the Messenger of Allah ﷺ say, "The true Mujahid is the one who strives against his own soul."
حدثنا أحمد بن محمد أخبرنا عبد الله بن المبارك أخبرنا حيوة بن شريح قال أخبرني أبو هانئ الخولاني أن عمرو بن مالك الجنبي أخبره أنه
عن رسول الله ﷺ أنه قال كل ميت يختم على عمله إلا الذي مات مرابطا في سبيل الله فإنه ينمى له عمله إلى يوم القيامة ويأمن من فتنة القبر وسمعت رسول الله ﷺ يقول المجاهد من جاهد نفسه
[Its chain of transmission is sahih]. Abu Dawud narrated it in jihad, chapter on the merit of guarding the frontier, no. 2500, from the hadith of Abu Hani via this route, and Ibn Hibban graded it sahih, no. 1624, as did Hakim, according to the criteria of Muslim, 2/79, and Dhahabi agreed with him. It has other routes in Ibn Majah, no. 3934, and Ibn Hibban, no. 25, and others, both abridged and in full.On this subject there is also a narration from Uqba bin Amir [Ahmad, 4/150] and from Jabir [Tabarani in Al-Awsat, 5/416, no. 4822].