They didn't. They all got bigger. Guys who are 6+ft can no longer fight as WW because they put on too much muscle and are too big. Fighters' height didn't decrease (it's actually the opposite), their weight increased, which forces them to fight at higher weight classes than before.
Ironically, since HW doesn't have a weight limit, HW fighters are now both taller and heavier on average, which means people who would have been HWs back in the day are now fighting at lower weight classes. Ali, Frazier and Louis would all be CWs today and would still be smaller than Usyk.