Size on mtbs is more about length of the top tube/front centre than it is about the seat tube.
I can’t remember which brand it is that started the trend of using ‘reach’ and ‘stack’ as a more meaningful way of determining the size of an MTB frame, but it looks to be a good idea.
Stack = draw a line perpendicular to the ground through the centre of the BB. The point at which it bisects the top tube is the stack.
Reach = draw a line parallel to the ground, back from the top of the head tube until it bisects the line you drew for the stack measurement.
I think this is correct – it’s more consistent than the usual methods, at least that’s the argument.