Gaza has border with Egypt not controlled by Israel. In fact, ~150k people left Gaza in 2022, and numbers from 2023 are of similar scale [1]. I wouldn't call it a prison
The Rafah crossing is effectively controlled by Israel as well. Egypt gets ~$1.5B/yr in defense aid from the US ever since the six day war in exchange for playing nice with Israel. That has been interpreted by Egypt to mean including Israel in decisions regrading the Rafah crossing and enforcing the Israeli blockade there.
I'm sure you're aware of the indefinite blockade? And what Hamas did before that? etc. Let's not have another debate that brings out the facts piecemeal; it's polarizing, for one thing, and it's also misleading to bring them out in isolation. Many following the issue know them by now.
[1] https://twitter.com/Aizenberg55/status/1665745935589076992