> fundamentally incompatible with customary international law
So is bombing countries on a whim.
If you want to take the high ground you have to make sure you don't first poison it with your own stupid mistakes. Iran can make a pretty credible play for reparations, and if the belligerents are unable or unwilling to pay up then Iran can selectively blockade the strait for their vessels and cargo. It is one of those little details that was 100% predictable going into this.
Not exactly "on a whim" after Israel has been attacked by at least a hundred thousand Iranian rockets and drones.