In reality, this has not been a disaster for them. They anticipated much worse but also coming out of this unscathed. They believed that Israel would cause many more casualties while they were hiding in the tunnels. They are still for the most part doing it and the hostages are their insurance.
Israel has played along with this because it is infected with Oslo syndrome generals and the morality syndrome. You need to fight a savage terror group without any constraints. Let the Arab world take the Gazans out of harm’s way. They claim that they are native to Gaza but are refugees there. Let them get refuge somewhere else. Syria and Yemen are doing their own Jihad let the Gazans help them.