Surah Al-Hujurat 49:5
وَلَوْ أَنَّهُمْ صَبَرُوا۟ حَتَّىٰ تَخْرُجَ إِلَيْهِمْ لَكَانَ خَيْرًا لَّهُمْ ۚ وَٱللَّهُ غَفُورٌ رَّحِيمٌ
And if they had been patient until you [could] come out to them, it would have been better for them. But Allāh is Forgiving and Merciful.
Translation: Saheeh International
Tafsir
And had they been patient annahum ‘they’ has independent status on account of inceptiveness; alternatively it is said to govern an implied verb such as thabata ‘had their patience been maintained’ until you came out to them it would have been better for them; and God is Forgiving Merciful to those of them who repent.
Excerpt from Tafsir al-Jalalayn, commentary on 49:5, via Quran.com. The reader has the full commentary and 9 more tafsirs.