the main problem is that doing so would probably result in the death of the hostages. hamas wants to stay in power, even if gaza is reduced to sand, they will hold onto the hostages until their power, even over nothing but skeletons, is assured.
the IDF could continue to engage on hamas's terms, or it could make the heartbreaking decision to give up on the hostages and focus on saving the innocent gazan civilians.