Prepare for TL;DR!
Firstly -from what I can see in this screen-grab, it doesn't appear these comparison figures are based of accurate geo numbers. It's saying the reach would be +7mm on a medium Highlander, but the Deviate website says the reach on a medium is 444mm, or +1mm on the SC measurements listed here. Another discrepancy in the chart above lists the Deviate as 0.9 deg slacker HA, whereas Deviate list a 66deg HA (0.4deg slacker).
Just remember my SC has a stem at 33mm instead of the GG sized 50mm stem.
I'm not sure how geometry geeks do it, but normally the reach measurement of a frame doesn't include the stem length, so best to take that from your mind momentarily when considering the frame size. IMO pick the frame size you want based on your preferred descending/attack position (current positioning, or much more stretched out) and what response you want from the bike when fed an input from the bars (similar to your current setup, or more straight-line/high-speed stability - but less flickable/responsive to change of direction), and then use the stem length and seat position to tune steering response and seated fit. To make an assumption*, the ultra-short stem on your SC doesn't suggest you're needing/wanting more reach.
Assuming you selected a medium Highlander, but jumped to a 40mm stem on a medium, that means your ETT would only end up 23mm shorter than your current setup, some of which you'll be able to make back from sliding the seat back if you feel the need. With the Highlander having longer chainstays (not much on paper, but more at sag due to the suspension's rearward travel) a few mm change there won't destroy the climbing position of the bike IMO - and to be honest having the ETT setup a fraction shorter is rarely much of an issue on climbs and can actually be a really good thing on long chainstay bikes as you get to just sit up and motor along...
Going to a size large with the 37mm longer reach would seemingly demand that you'd have no option but to use the 32mm stem you currently run. Which such a dramatic increase in front-centre and with such a short stem, there may be times where it is difficult to get enough weight onto the front tyre to really get or keep it digging in, and overall may require you to ride in more of a aggressive attack/forward body position for more of the ride. Riding a long bike from a forward position can be great for when you really want to pin it through fast rough stuff as it gives a shitload of extra stability/safety margin, but it can also be a little tedious on mellower sections of trail, and it is worth considering what the majority of your riding really is (we all like to dream we're enduro racers 24/7, but some of us (ie: me) are just cruising blue-trails with mates most of the time!). I've sort of brushed on this already, but the wheelbase increase of a size large (plus the ~10mm additional wheelbase not shown from the rearward travel at sag) may make the bike noticeably
feel long. Some people love that feeling, some people don't. While it's great for straight-line and high-speed stability through chunk or drops, it can make a bike feel a little slow/unresponsive in tight corners and low speed sections of trails. They're definitely not impassable because of the extra wheelbase, but that "quick flick of the bars,
and you're through..." feeling tends to disappear (IMO).
*To declare my biases however, I'm not a fan of ultra-long modern geometry bikes or ultra-short stems. Both are great when the trails are fast and you have the strength to muscle the bike around and stay aggressive on the bike, but tend not to be so much fun when you just want to back off a bit and have fun on some flow trail (again IMO). Either option would will be perfectly rideable, but it depends what you want to focus your time and the bike on. If you want a similar feeling fit to what you have now, just with some rearward travel wizardry, the medium would do nicely. If you really want to get off the brakes more in the steep steeps and high speed section, and have the upper body strength to do it, a size large may be just the ticket. Just be aware that it's not
all positives in the "next size up", and (psychologically) a bike that doesn't feel as lively due to sheer size can be a drainer on mellow trails at times. Some people don't seem to care at all and just motor along regardless, haha, so each to their own!