Before the apologists chime in to defend this atrocious war crime:
Even IF (and that’s a mountain sized if) the IDF aren’t lying about there being dead hostages in the hospital, that absolutely does NOT constitute the kind of harmful acts that would make a hospital a legal military target.
As an aside, killing people to recover the already dead is one of the most perverse shows of disrespect for human lives possible.