Egypt is trying to have their cake and eat it too. Total crackdown on islamists at home - whether Hamas or any other incarnation of the Muslim Brotherhood - but also making sure they remain a thorn in the side of Egypt's rivals. See for example the massive smuggling tunnels discovered by the IDF in Rafah in 2024, which had been keeping Hamas covertly resupplied through Egypt. Hard to imagine that Egypt was unaware.