The Messenger of Allah ﷺ forbade anyone from departing until his final act was a visit to the House.
حدثنا علي بن محمد حدثنا وكيع حدثنا إبراهيم بن يزيد عن طاوس
نهى رسول الله ﷺ أن ينفر الرجل حتى يكون آخر عهده بالبيت
[Sahih]. Tabarani reported it in 12/396 through another route from Ibrahim bin Zayd, with the same wording, and Busiri graded it daif because of Ibrahim bin Yazid Khuzi, hadith no. 1521, and the preceding hadith serves as a corroborating witness for it.