Surah Al-Hujuraat

49:5

وَلَوْ أَنَّهُمْ صَبَرُوا۟ حَتَّىٰ تَخْرُجَ إِلَيْهِمْ لَكَانَ خَيْرًۭا لَّهُمْ ۚ وَٱللَّهُ غَفُورٌۭ رَّحِيمٌۭ

And if they had been patient until you [could] come out to them, it would have been better for them. But Allah is Forgiving and Merciful.

Tafsir 49:5

O Messenger! If these people who call out to you from behind the dwellings of your wives were to have waited and not called out to you until you came out to them, then talked to you in lowered voices, it would have been better for them than calling out to you from behind the dwellings, because it would have been more dignified and respectful. And Allah Forgiving of the sins of those of them who repent, and others. He Forgiving of them due to their ignorance, and is merciful to them.