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.
كَانَ رَسُولُ اللَّهِ ﷺ يَقُومُ فِي الْجَنَازَةِ حَتَّى تُوضَعَ فِي اللَّحْدِ فَمَرَّ بِهِ حَبْرٌ مِنَ الْيَهُودِ فَقَالَ هَكَذَا نَفْعَلُ فَجَلَسَ النَّبِيُّ ﷺ وَقَالَ اجْلِسُوا خَالِفُوهُمْ