Kirks “surrender” in Star Trek III would be a war crime in a modern war.
Scuttling the ship is one thing. You don’t have to let the enemy take your stuff when you surrender. Scuttling with enemy boarders aboard is also OK to prevent capture of the ship.
But surrendering with the intent of luring enemy personnel aboard when you scuttle, so that you can more easily capture their ship for your own use, is a flagrant violation of the Geneva Conventions. Surrender is a way to end hostilities, not a battle tactic.
Kirk might be able to try to play a technicalities game in that there wasn’t a signed instrument of surrender, but even if he could establish having followed the letter of the law, he certainly didn’t follow the spirit.
The Klingons should have added war crimes charges to the charges of assassinating Gorkon in Star Trek VI. It’s understandable that they might have considered it diplomatically infeasible to push extradition too hard in Star Trek IV, but they had him in custody in VI. War crimes charges couldn’t be so easily dismissed, because he actually did do it even if he had some technicality to minimize liability.