It's less about loyalty to your current company, and more about the appearance of loyalty to your next company.
Fuck I don't want to leave after a short stint either. But when the market is shifting fast as it has been for... my entire career, and people are getting hired in at 20%, 40% more than my salary while I'm on my third 4% CoL adjustment then yeah Imma bounce.
Workers didn't create this situation, companies did. They can figure out the consequences. Having a resume full of short stints never seems to have done me any damage and I don't buy this propaganda that it does.