No, they don't, not to the extent you suggest. A hospital is not a magic bit of holy ground immune to trespass by an invading force. Going in with infantry to root out active combatants within is totally legal. Even forcing out patients and medical staff to later on destroy the facility is legal so long as they can make a show that it serves a purpose (such as storing hostages taken from Israel) beyond directly and ONLY targeting civilians and there is a place for these folks to go (hint, there is). The IDF isn't disrupting any legit operations of that hospital beyond what Hamas has done to it already. The IDF can most certainly prevent Hamas from using any part of it for military purposes.Hospitals have special protection under international law. Disrupting a hospital during war means an automatic gigantic number of casualties with no way to treat injured people.
But that stuff doesn't really matter to you. You don't care that Hamas rains down unguided rockets that strike Israeli medical facilities, just that the IDF has some guys walking through some halls as if they are stabbing newborns or something.