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