“The Messenger of Allah (ﷺ) said: ‘Whoever offers the funeral prayer in the mosque will have nothing (i.e., no reward).’”
Sunan Ibn Majah Book 6, Hadith 85