We used to offer the Friday prayer along with the Messenger of Allah (ﷺ) and return (to our homes) while no shade of the walls was seen (at that time).
Sunan Abi Dawud Book 2, Hadith 696