"The IDF includes crack commandos who ought to have been able to take out Hamas operating within or close to hospitals without destroying the hospitals and harming patients and staff."
The IDF isn't going to insert their special forces into an area like that until it's been softened up by air strikes first.
The IDF has finite resources of special forces and aren't going to accept deaths of those forces when the aerial option can be used first.
Yes, that's the calculation. Aerial operations means more Palestinian civilian deaths, but less Israeli armed forces deaths. Name me a country that would accept the deaths of more of their own ground forces over using aerial strikes when they have complete control of the skies.
Cheers!