I heard the Messenger of Allah ﷺ say, "Every person who dies has his deeds sealed off, except for one who dies while standing guard at the frontier in the cause of Allah. His deeds keep growing until the Day of Resurrection, and he is kept safe from the trial of the grave."
وبهذا الإسناد عن فضالة بن عبيد قال سمعت رسول الله ﷺ يقول كل ميت يختم على عمله إلا الذي مات مرابطا في سبيل الله فإنه ينمو عمله إلى يوم القيامة ويأمن فتنة القبر