We've seen some evidence that hospitals are used outside their humanitarian function.
It's true that even if the hospital loses it's protection that does not mean that it's ok to just go ahead and level it because of the presence of a single combatant (and that hasn't happened, I'm pretty sure e.g. no hospital in Gaza suffered a direct bombing attack e.g. but it may be ok under certain circumstances to completely level a hospital that is used for military purposes if enough warning has been given), the proportionality principles still applies. Proportionate has a very specific meaning in terms of the Geneva convention which most people aren't familiar with. I agree that the IDFs actions must be proportionate in that sense. The IDF claims its actions are. The IDF has lawyers that evaluate actions against international law.
Human Rights Watch isn't necessarily an unbiased observer here. Naturally they would not have access to the IDF's intelligence and the IDF can be justified in not sharing its intelligence to protect its sources.
My basic take is why is it beneficial for the IDF to waste time and resources attacking hospitals that have no military use? It's bad PR, it's wasted efforts that could be directed somewhere else. Doesn't make sense. It's possible it could be "more careful" in avoiding those in certain situations. Is it the highest item in the priority list (e.g. above the security of IDF soldiers), probably not.