Here in Australia, you'd technically be in violation of the 400 feet AGL limit the moment you went over the edge. My understanding from the CASA certified training I did, is that you have to be aware of your height AGL
at the craft.
However, it wasn't the legality the OP was asking about, but whether the bird would detect that it was over the legal limit and descend. I'm somewhat relieved to find that it wouldn't do so. I live in a very hilly area, and some of my favourite camping areas are canyons, where it's still legal to fly them if you're within the standard laws (daylight, LOS, under 400' AGL, 30m from people and property etc), so I'd hate to think that it would suddenly descend to legal heights if it went over an edge.
The P2 is quite disconcerting to fly in very hilly and canyonous terrain. You have to have a good eye for your real altitude, because the altitude fed back via the FPV system really struggles to give a true indication of the height, and with the slow descent speed in places where the ground can descend faster than the quad can, it can be hard not to risk becoming technically too high.
This is the most canyonous I've flown so far (with the full blessing of the Ranger who saw me doing the preflight routines, and asked me all about the quad, then said that National Parks haven't made a ruling yet, so go for it - since I'd already assured him I wasn't going to be putting it anywhere near other campers or their campsites).