The Prophet ﷺ as saying: When you see a funeral, stand up for it till it leaves you behind or it is placed (on the ground). (Using translation from Abū Dāʾūd 3172)
النَّبِيَّ ﷺ قَالَ إِذَا رَأَيْتُمُ الْجِنَازَةَ فَقُومُوا لَهَا حَتَّى تُخَلِّفَكُمْ أَوْ تُوضَعَ