What do you mean "Not that this is true"? Israel named three commanders and says at least two were eliminated. If that were false, it would be easy to disprove.
"Bombing a hospital" is a bit of an overstatement - they bombed the room where the targets were. Six casualties is probably <1% of the people in the hospital.
Thankfully the authors of the Fourth Geneva Convention understood that a blanket prohibition on hospital strikes was unworkable, since terrorists who don't care about IHL would be untouchable. Hence
> The protection to which civilian hospitals are entitled shall not cease unless they are used to commit, outside their humanitarian duties, acts harmful to the enemy.
And yes, if Netanyahu was hypothetically directing military operations from an Israeli hospital, it could be legal to target it, subject to other IHL principles like precautions in attack.