The Messenger of Allah (ﷺ) said: He who washes the dead should take a bath, and he who carries him should perform ablution.
Sunan Abi Dawud Book 21, Hadith 73