Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Pilgrims do not need to remain in Makkah after throwing the pebbles on the 13th of Dhul-Hijjah and performing the final Tawaf.
Responding to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
If pilgrims have performed the Farewell Tawaf, they can leave Makkah. They don’t need to stay in Makkah after completing the hajj rituals. Tawaf al-Wada` (farewell tawaf) is the last hajj rite.
Therefore, pilgrims do not need to remain in Makkah after throwing the pebbles on the 13th of DHul-Hijjah and performing the final Tawaf.
In fact, after the final Tawaf, they should not hang around in Makkah unless they have to do so for essential chores.
Almighty Allah knows best.