I say: Although the verse was revealed about Masjid al-Dirār in particular, the building itself is not the point, as is plain. What matters are the traits ascribed to it—causing harm and creating division. Any mosque that displays these traits, in whole or in part, takes the same ruling as Masjid al-Dirār. For that reason al-Qurṭubī says in his Tafsīr:
“Our scholars state: Every mosque built to inflict harm, or for show and self-promotion, falls under the ruling of Masjid al-Dirār; it is unlawful to pray in it.”
He also says:
“Our scholars state: A mosque may not be built right beside another mosque; it must be torn down and its construction prevented lest the people desert the first mosque and leave it empty—except when the neighborhood is so large that one mosque is insufficient, in which case a second may be built. Likewise, they say: In a single city it is improper to establish two or three Friday mosques; the second must be stopped, and whoever performs the Friday prayer there has not discharged the obligation. The Prophet ﷺ burned and demolished Masjid al-Dirār. Al-Ṭabarī transmits that Shaqīq once came to pray in the mosque of Banū Ghāḍira but found the prayer finished. He was told, ‘The mosque of such-and-such a clan has not yet prayed.’ He replied, ‘I do not wish to pray there, for it was built to cause harm.’”
Eighth: Places where the earth was swallowed up or where divine punishment descended. It is absolutely forbidden to enter them unless one is weeping and fearful of Allah, for the Prophet ﷺ said—when he passed by al-Ḥijr—“Do not enter the dwellings of those people who were punished, the people of al-Ḥijr, unless you are weeping. If you are not weeping, do not enter them, for I fear that what befell them may befall you.”