Ref. No. 912/41-48B
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follows:
Yes, the salah offered leaving two or more rows or in varanda inside the masjid will be valid.
And Allah knows best
Darul Ifta
Darul Uloom waqf Deoband