Well I’m a smidge over 5’4″ and my Commencal Meta is a small, my Bird Aeris is a small. I have long legs for my height 31″ inside leg. I’ve been running short stems 32-50mm on my bikes for the last 14 years to get a decent fit. It’s one of the problems of running a high saddle position against your height, keeps you further away from the bars, lucky I have a + ape.
All the MTB’s I bought back in the mid 80’s were small, even had a frame built for me, in all this time testing a bike before you buy was normally out of the window as most shops only stock medium and large.