"that isn't how the UN works anyway, especially the ICC which charges individuals" Exactly so to resolve the current situation, Israel has no options. Doubtful that the court would convict Hamas anyway for just killing a few jews.
They can press charges while Hamas continues to rape and murder and wait and then even with a conviction, the rape and murder continues or they can do what they are doing now and resolve the situation. Any long term solutions can come later.
Also assume the US should just bring a UN court case against the Houthis in Yemen as well instead of using force to defend ships?