From Sahih Muslim (Hadith 3204):
A'isha (Allah be pleased with her) reported:We used to garland the goats and send them (to Mecca), and Allah's Messenger (ﷺ) stayed back in Medina as a non-Muhrim ard nothing was forbidden for him (which is forbidden for a Muhrim)
Reference: Muslim 3204