Not only Israel, it looks like US intelligence has confirms that. This, I believe has been generally known for a while (from sources other than the IDF)
Hamas has command node under Al-Shifa hospital, US official says
US official with knowledge of American intelligence says Hamas has a command node under the Al-Shifa hospital, uses fuel intended for it and its fighters regularly cluster in and around Gaza’s largest hospital.
The information comes after comments made Sunday by a top White House official that Hamas is using hospitals and civilian facilities.
https://www.msn.com/en-us/news/world/hamas-has-command-node-under-al-shifa-hospital-us-official-says/ar-AA1jRKBs
IDF is reporting finding weapons caches and evidence of hostages being held (straps on chairs etc) under a childrens hospital.
Hamas clearly wants to keep the Israelis out of their command posts, but it's also to their advantage to see if they can get Israelis to kill infants and wounded (according to Hamas, they want to die). Obviously, otherwise, defending a hospital, if you actually care about the civilians, is absurd. The best option for the hospital would be to just surrender it to the Israelis, who are clearly more able to provide what is needed and are saying they are very willing to take any patients that can be moved to them.
As noted before, having weapons in a hospital, or fighting from a hospital makes it a legitimate military target. I certainly would not expect the Israelis to directly attack one, but... if Hamas can make it look like they did..... (many would certainly believe, no matter how absurd the evidence)
It's looking like the Israelis are moving to surround it. Once surrounded, there is not much that can be done from Hamas, but again, there are all the tunnels.