Malik related to me from Hisham ibn Urwa from his father that the Messenger of Allah ﷺ said, "No one leaves Madina preferring to live elsewhere, but that Allah will give it better than him in place of him ."
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ لاَ يَخْرُجُ أَحَدٌ مِنَ الْمَدِينَةِ رَغْبَةً عَنْهَا إِلاَّ أَبْدَلَهَا اللَّهُ خَيْرًا مِنْهُ