You are correct that altitude MSL is computed by the FC from GPS data (although that is not a Doppler measurement - it's time of flight), but that is not the primary altitude measurement and is not as accurate, over the relatively short duration of a flight, as the relative altitude (relative to the takeoff point, not AGL) derived from barometric measurements.
The GPS-based altitude MSL is not used at all in controlling the aircraft - that is entirely the barometric altitude. There is no AGL altitude measurement at present - perhaps that was your point - I wasn't clear on that.
I misspoke and should have said typical GPS units internally use Doppler effect to not only compute geoposition relative to the earth's surface but also compute altitude normal to its geoposition. Actually, position is computed 3-dimensionally relative to the earth's core and requires signals from at least 4 satellites.
Doppler shift occurs as transmit signals traverse space from each detected satellite location to a receiver. Those shifts are detected as frequency deviation variations used to compute satellite distances. Combining known satellite positions and their distances from a receive allows a GPS to triangulate the receiver's location in 3D space.
So the FC could compare the 3D altitude vector at launch to the 3D altitude vector in-flight to derive a relative altitude differential. Except the earth isn't smooth nor perfectly round (it's actually flat, so the voices tell me) which is why a geospatial vector map is needed to provide a general ground elevation normal to the bird to derive an actual AGL.
I respectfully disagree with you about barometric based altitude derivations being more accurate than GPS derived altitudes. That may have been true in the mid 60's to late 70's, but it is not true today. Barometric pressure is subject to pressure density fluctuations that, given equal elevations or altitudes, change from one geolocation to the next. A lot can happen during a 25 minute flight. Think turbulence and microbursts.
My opinion (which is worth the price you pay for it) is this is why DJI recommends pilots switch from P-mode to A-mode when things go wonky. I think of it as a failover but less accurate solution.
Where we do agree is that while all the necessary telemetry is available to the FC to calculate MSL altitudes, the data is meaningless without either an instrument that can measure distance to the ground (radar/LIDAR/laser ranging), or a geospatial map from which the FC can correlate its position to derive AGL. Ensuring precision through redundancy probably requires both instrumentation and a map.
Just a parting thought, DJI has bottom mounted cameras (on the P4P and other birds) that already optically derive AGL using downward facing cameras by stereoscopically computing the distance between bird and ground. I've read a number of threads regarding flight over bodies of water being problematic due to the lack of sufficient detail to reliably compute distance. Upgrading that system and adding some NV capability certainly couldn't hurt.
But if it were up to me, I would not put a lot of credence into the approach unless the FAA were to amend its guidelines to define "ground" as anything on the earth's surface with sufficient density to appear ground-like (such as tall dense trees, forests, etc.) and DJI solves its various issues with vision distancing. But that's probably a discussion for another thread.