The real issue is the Flight Controller's value for Yaw. Shortly after the battery is turned on the FC sets the Yaw value from the magnetometers (compass). After that Yaw is derived mostly from the IMU; i.e the compass has only a small effect. So, if it's a situation where the Mavic is turned on while sitting on a manhole cover then the compass will recover after launch (because it clears the effects of the manhole cover. BUT, Yaw is still compromised. Many fly-aways have been caused by this situation.
The single most effective check to prevent a fly away at launch is to make sure the heading indicator in the Go App is correct. This triangle represents Yaw value being used by the FC.
View attachment 16627
Suppose Mavic is turned on while sitting on a manhole cover and then moved to a site that isn't geomagnetically distorted. In this case the Yaw value will gradually change to reflect the now correct compass value. The is because of the small influence of the compass. If you look at the Go App you can see the red triangle change. When it's correct then it's OK to launch.
Now suppose the Mavic is turned on at a site that isn't geomagnetically distorted and then moved to the manhole cover for launch. If launch is immediate the Yaw value will be close enough to correct that there won't be a problem. Again, check the Yaw value presented by the Go App.