Why this ban is against the teachings of Islam?

Islamic praxis is based on the Qur’an, authentically Sunnah of the Messenger, upon him blessings and peace, both exemplified, elaborated, and extended on the basis of the fundamental principles by the Companions of the Prophet, and, later, in Islamic jurisprudence, through the consensus of the scholars.

If an action is against these sources, it is against Islamic teachings.

Why a ban on any Muslim to enter a congregation Mosque is anti-Qur’anic?

Allah Most High says in the Qur’an, Indeed, Masjids are for Allah (Q 72:18).

And the Most High, Exalted is He, says: Surely (We will punish) those who disbelieve and prevent (people) from the way of Allah and from Al-Masjid-ul-Harām (the Sacred Mosque), which We have made for all men, where residents and visitors are all equal. And whoever intends therein to commit deviation with injustice, We will make him taste a painful punishment. (Q 22:25).

Why this ban is anti-Sunnah?

Everyone knows that our beloved Prophet faced hypocrisy in Madinah. There were known hypocrites who potted against him and Islam. They event plotted to kill him, upon him blessings and peace. Did he, Allah exalt his station, ban them?

Why this ban is against the practice of the Companions?

The well-known incident when a person stopped Sayyidina Umar b. al-Khattab, Allah be well-pleased with him, from delivering his khutba, until he explained how he got the cloth for his thawb, because the share distributed to everyone from the bayt al-Maal was not enough to make a thawb for the person who stopped him right in the middle of his khutba is the proof that not only explaining to the congregation what was wrong in the khutba after the salah, as I did, is valid, but it could also be done during the khutba!

Sayyidina Umar b. al-Khattab, Allah be well-pleased with him, who was khalifa at the time, did not ban him; he answered the question, stating that his son had gifted him his share, and then he continued the khutba. This incident attests to the courage of the questioner, his sense of his rights as well as the uprightness of Sayyidina Umar b. al-Khattab, Allah be well-pleased with him,

What we have in this ban is the practice of the Jahilliya, those who routinely banned people from entering the House of Allah, not of Islam.