General Milley promising to tip off China in advance if America planned to attack: OPSEC violation?

It does not have to be an international court, actually. Under the laws on war crimes, it is appropriate for a belligerent to prosecute its own war criminals, in fact this is considered preferable. The structure of international tribunals actually consider themselves “courts of last resort” when home countries will not pursue war crimes charges against their own war criminals. But the prosecution of say, Lt. William Calley for the My Lai massacre is considered entirely appropriate in terms of international law. Our treaty obligations are primarily to stop and punish our own war criminals. The international tribunals have been setup for situations where countries refuse to do that.

Edit to add: My rejection of your citing the Japanese court is they do not really have jurisdiction to rule on if an American bombing campaign is illegal under our agreed upon treaties, and even so much as they have any authority to speculate on such matters at all their core ruling in that case would be of very questionable precedential value in my opinion.

A major limiter to those tribunals is you usually need force to bring a defendant to them, and those international courts don’t have armies.