At-Tawba • BN-TAFSEER-IBN-E-KASEER
﴿ مَا كَانَ لِلْمُشْرِكِينَ أَن يَعْمُرُوا۟ مَسَٰجِدَ ٱللَّهِ شَٰهِدِينَ عَلَىٰٓ أَنفُسِهِم بِٱلْكُفْرِ ۚ أُو۟لَٰٓئِكَ حَبِطَتْ أَعْمَٰلُهُمْ وَفِى ٱلنَّارِ هُمْ خَٰلِدُونَ ﴾
“IT IS NOT for those who ascribe divinity to aught beside God to visit or tend God's houses of worship, the while [by their beliefs] they bear witness against themselves that they are denying the truth. It is they whose works shall come to nought, and they who in the fire shall abide”
Please check ayah 9:18 for complete tafsir.