I see one scenario which could prevent total annihilation of Gaza:
Although the scenario is very unlikely. Considering GHQ dismantled Pro-Palestine protest today using police force. Generals in top positions have gone seriously insecure, they fear IK's return in everything.
Anyways, if somehow Pak generals borrow courage then following can happen:
Leaders of Turkey, Egypt, Saudi, Pakistan, Qatar, UAE, Iran and most importantly Russia do an emergency meeting in Saudi Arabia and issue a warning to the Israel. To make this warning any effective, PAF to bring 2 squadron of fighter aircrafts and C130s for humanitarian supplies for Gaza in Saudi Arabia or Egypt or Turkey (Any country near to Israel). This is not to fight IDF but a symbolic means to deter Israel. Similarly same thing to be done by other major countries. So in one hand you are pressuring Israel to let the humanitarian aid reach Gaza and on other hand you bring assets to standby nearby incase anything to happen to the aid convoys. Egpyt will have massive role to play as its only neighbor to Gaza that can provide access. To further pressurize Israel, Saudi can announce that its deal with Israel normalization can be postponed indefinitely if massacre continues. Israel will get to know that it will remain alone in the region forever and its efforts and successes to normalize relations with other arab countries may go reverse. US certainly cannot afford a large scale conflict when it wants to preserve every last of its asset for its ultimate enemy that's China and Ukraine is still going on.
I know all of above is highly unlikely but it seems the only way to stop Israel from complete annihilation of Palestine. If no unity is shown and no concrete steps are taken then Gaza will be removed piece by piece.