It’s quite different to target an innocent civilian and another to destroy a hospital because that’s where hamas launches rockets from.
Intent matters quite a bit.
When Hamas stars criminally prosecuting its soldiers for killing and raping civilians then you can start talking about how Israel and Hamas are similar.
But equating Israel incidentally causing civilian deaths with Hamas purposely is not helpful to the conversation.