https://madscientistmtb.com/bike-geometry-compare/Input both bikes into this calculator. To compare hardtail properly, input at the top a negative fork travel for how much sag you have. Then in the bottom calculations, "Calculated Seated Fit" is saddle to bars. You'll find that with the same ETT, your saddle to bars will be very close and it's the reach that differs. So it'll feel similar length while seated, but your body is rotated forward with a bit more weight on the hands, but a steeper STA longer reach bike will feel longer while standing.
The picture visualization is perfect to see how they compare, then if you really like your current fit, you can see how stem, stack, handlebar, etc changes will dial it in, so you can make a good guess at what size components to start with.