Not sure which kings and leaders you're referring to and when, but Churchill was bald, Lenin was bald, Khrushchev, Gorbachev, Eisenhower, Van Buren. If we're talking further back, Napoleon had short thinning hair, Caesar haircuts were short, Socrates was bald, some Greek statues have a full head of curly hair(particularly for younger guys), some are bald, and a handful have longer hair.
There weren't exactly a lot of supercuts locations in ancient times, and grooming in general was pretty crude. They had crude razors, and could give crappy haircuts to keep the length down, but they weren't styling their hair the way people do now. A full head of hair is more a symbol of youth, not necessarily long hair. Our culture is more youth obsessed than previous cultures, so balding guys try to hang on to their hair to look younger. They also dye their hair for the same reason. It's a full head of hair they're after, not longer hair. Guys with ponytails are either magicians or rapists.
And not sure your example of Milei, Trudeau, and Biden is accurate. Yeah, obviously nobody is complementing Biden on his hairline because dude's been bald for 50 years and was clinging on with comb overs and got hairplugs before they even knew what they were doing and were just stapling pubes to your scalp. Trudeau didn't just get complimented on his hairline, that's entirely what got him voted into office.
I don't know have the voting numbers for age demographics over time, but vanity seems more important when you have lots of younger voters. Leaders now dye their hair, get plugs/transplants, whiten their teeth, wear makeup, put lifts in their shoes or stand on boxes at debates.