It is narrated from Ali bin Abi Talib (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to stand for funerals, then later he sat down.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 582
Hadith Takhrijاخرجه مسلم ، الجنائز، باب نسخ القيام للجنازة (962)۔