The Prophet ﷺ said, "Three things follow the deceased to his grave. His family, his wealth, and his deeds. Two return and one remains. His family and his wealth return, and his deeds remain with him."
حدثنا سفيان حدثني عبد الله بن أبي بكر
عن النبي ﷺ أنه قال يتبع الميت ثلاث أهله وماله وعمله فيرجع اثنان ويبقى واحد أهله وماله ويبقى عمله
Its isnad is sahih. Abdullah bin Abu Bakr Makhzumi Madani is truthful, and the hadith was narrated by Bukhari 8/134 in "Riqaq," "The Pangs of Death," Muslim 4/2273 no. 2960 at the beginning of "Zuhd," and Tirmidhi 4/589 no. 2379 in "Zuhd," "What Has Been Said About the Example of Ibn Adam," where he said, hasan sahih.