Trek Domane geometry summary
It is always preferable to have the information you need when setting up a bike all in one place. It will save us having to go to Geometry Geeks.
This journal post will help compare the two Domane generations frame sizes.
Gen5 XS - reach matches the 50cm exactly (36.8), but stack (52.4) is well short of the 50cm's 54.6 — actually closer to the 47cm's 52.7. So XS rides longer than a 47cm but noticeably lower than a 50cm.
Gen5 S - reach matches 52cm exactly (37.1), stack (55.5) sits just under 52cm's 56.1. Very close match to a 52cm, just slightly lower stack.
Gen5 M - reach matches 54cm exactly (37.4), and stack (57.5) is an exact match to the 54cm's 57.5. This is essentially a 1:1 equivalent.
Gen5 ML - reach matches 56cm exactly (37.7). Stack (59.6) is actually a bit taller than the 56cm's 59.1. So your example — Gen5 ML is a 56cm, not a 54cm. It's not just equivalent to the 56cm, it's got slightly more stack than the 56cm did.
Gen5 L - reach matches 58cm exactly (38.0), stack (61.8) is taller than the 58cm's 61.1.
Gen5 XL - reach (38.4) falls between 60cm (38.3) and 62cm (38.6), and stack (64.8) falls between 60cm (63.2) and 62cm (65.6), leaning slightly toward the 62cm.
The frame reach progression per size is nearly identical between generations (roughly +0.3–0.4cm per size), but the stack progression grew more in the upper sizes on Gen5, giving taller riders a more endurance-oriented, upright fit than the equivalent Gen4 frame.