ANSWER The "frame size" is no longer a physical measurement on the bike. Instead its a "virtual" distance.
Remember traditional horizontal top tube frames? These have been "normal" for decades, and were still prevalent in the `90s
A design like this measures the "frame size" from the center of the BB axle straight up the seat tube. Some variation exists on where the measurement ends, but its either "centerline of the top tube" or "top of the seat tube" or "center of the seatpost clamp bolt" This contributes to some slight variation between brands.
As frame designs changed from the 90s through to now, the top tube became more sloped. Effectively there's less metal resulting in a lighter bike, and more standover clearance. But the seat post is now longer and subject to more torque, so it bends easier. The answer there was to make the seatpost thicker, increasing from 25.4mm steadily toward 31.6/8mm. A wider pipe gives more strength without a linear increase in mass.
As a rider, there are only the three contact points with the rider, the saddle, the pedals, and the hands. If the bike's frame takes some torturous path, but those three points stay in the same relative position to each other and to the ground and axles, it will feel the same when standing still. (slight handwave on forks/rake/trail here)
So the frame size measurement is based on what that frame would have measured if it was a horizontal top tube.
In your case, the red line is 50.1 cm and the hot pink line is 56 cm, but isn't to a physical feature on the frame.
This is one reason why many makers now use small/med/large nomenclature and have to produce and stock fewer total frame sizes, instead of increments of 2cm or 1inch, between 48 and 60cm.