Not necessarily true. If two nations went to war, they might settle through a treaty or some other agreement. Depends on what they were trying to do. The defeated leaders certainly got the axe if one nation completely over-ran and annexed the other outright. If they promised to play nice, the leaders sometimes had to do little more than pledge loyalty.
Have you seen 300 (or read the comic book?) That’s about war between Greece and Persia. The Persian king (Xerxes?) goes to the Spartans and simply demands that they give him earth and water as a sign of their loyalty and subservience to him. If Leonidas had capitulated immediately, he might have gotten off scot-free.
Similarly, the Romans left rulers in place wherever they went, asking only subservience to Rome. Many times, of course, the local rulers refused. The Romans killed them and substituted new rulers.
So it all depends. William killed Harold Godwinson, but that was during battle. Most of the Saxons were killed because they refused to acknowledge William, not because he defeated them. Over time, it became even softer. As I read history, the victors kept the rulers in power rather than make them into martyrs or lose control completely.
In the Franco-Prussian war of 1870, the Germans captured the Emperor of France and marched into Paris. The French started the war, and yet the Prussians didn’t kill the Emperor or any of his government (they did kill the rebels of the Commune, and anyone else that refused to admit the defeat).
That feeling probably lasted through the Great War. The French made no effort to bring the Kaiser to trial, and he spent his declining years in Holland. As the League of Nations emerged, and nations struggled to solve things on a global scale with diplomacy rather than guns, people began to think that any war was wrong, and that those who started wars had no justification for them. That led to Nuremberg, unthinkable even 30 years before.
Enough sick s**t happened in WWII to make trials useful, if only to present the facts to the world and to history.