You are correct in assuming that RTH is not something that works as a 'get-out-of-jail-free-card' for all situations. Setting up RTH should be done as part of your pre-takeoff checks and should always take your location into account. When you start the Mavic and take-off, the Mavic will record its home point, and will also have recorded the take-off point as altitude 'zero'. If you then fly down into the canyon, then you are flying 'negative altitude' below your starting point. If you select RTH when the Mavic is down in the canyon, it will rise up through the zero point to the altitude above zero, that you selected as the RTH height. e.g. RTH set to 50 metres - you are 30 metres down in the Canyon and you select RTH ... The Mavic will rise 80 Metres then come back to you. If there is something that's between you and where your Mavic may end up, that is higher than 50 metres, then you need to set the RTH height accordingly. Same if you have flown the Mavic under something (canyon overhang etc.), you need to be aware that it may rise into the obstacle! ... Bearing in mind of course, that if you value your Mavic, you'll keep it line of sight and know where it is ...
You are lucky with the
Mavic 2 pro in that it is bristling with sensors in all directions including top and sides - but don't rely on them! Hopefully they will get you out of trouble in the worst of it, but try to be disciplined about looking around (with the drone) to see where you are and keeping a mental map of where you are flying.
RTH is a very useful facility, so get out in the open on a small hill or something, and just try it out. And while you try it, use the 'Pause' button on your controller so you get familiar with it and what it does, as that may be your salvation if you do realise that the Mavic is not where it should be, or doing what you expect it to do - when you hit RTH!!!