And it doesn’t actually matter if Hamas was using the hospital, or if it was a base of operations.
There are very clear rules in the geneva convention about how to bomb a hostile hospital. Anything other than that is by definition a war crime. (spoiler: the rules weren’t followed).