A ritually defiled person is not to enter the camp of the Levites, this is the Temple Mount.
“If there is amongst you any man who is not clean……. he shall not come within the camp.” Devarim, 23:11
The Sages teach this means the camp of the Levites, which is the Temple Mount. Talmud Pesachim 68a
If a ritually defiled person went up the Temple Mount, he violates this prohibition.
This applies presently for men and women as we ritually unclean from defilement of the dead.