Read and reflect on verse 1252 from Surah At-Tawba: 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 ...
مَا كَانَ لِلْمُشْرِكِينَ أَنْ يَعْمُرُوا مَسَاجِدَ اللَّهِ شَاهِدِينَ عَلَىٰ أَنْفُسِهِمْ بِالْكُفْرِ ۚ أُولَٰئِكَ حَبِطَتْ أَعْمَالُهُمْ وَفِي النَّارِ هُمْ خَالِدُونَ
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