The Messenger of Allah (ﷺ) used to stand up for a funeral until the corpse was placed in the grave. A learned Jew (once) passed him and said: This is how we do. The Prophet (ﷺ) sat down and said: Sit down and act differently from them.
Sunan Abi Dawud Book 21, Hadith 88