This principle is a foundational element of modern military law, often referred to as the “Nürnberg Defense” or the concept of superior orders not being a valid excuse for committing war crimes. The killing of two alleged criminals that survived a U.S. bombing of their boat is a black-letter war crime.

From Moon of Alabama at moonofalabama.org:
My post on Trump’s war on Venezuela two days ago mentioned a Washington Post report (archived) about a war crime directly ordered by U.S. Secretary of Defense Pete Hegseth:
The longer the U.S. surveillance aircraft followed the boat, the more confident intelligence analysts watching from command centers became that the 11 people on board were ferrying drugs.
Defense Secretary Pete Hegseth gave a spoken directive, according to two people with direct knowledge of the operation. “The order was to kill everybody,” one of them said.
A missile screamed off the Trinidad coast, striking the vessel and igniting a blaze from bow to stern. For minutes, commanders watched the boat burning on a live drone feed. As the smoke cleared, they got a jolt: Two survivors were clinging to the smoldering wreck.
The Special Operations commander overseeing the Sept. 2 attack — the opening salvo in the Trump administration’s war on suspected drug traffickers in the Western Hemisphere — ordered a second strike to comply with Hegseth’s instructions, two people familiar with the matter said. The two men were blown apart in the water.
The Intercept had previously reported (archived) the second strike the U.S. military had launched against survivors:
People on board the boat off the coast of Venezuela that the U.S. military destroyed last Tuesday were said to have survived an initial strike, according to two American officials familiar with the matter. They were then killed shortly after in a follow-up attack.