This isn't a compass calibration issue. So calibrating the compass won't help with these situations.
Unfortunately, it can be difficult to know this situation exists prior to launch. The geomagnetic field is distorted and it's easy for the field's strength to be close to normal while the direction is incorrect. When you look at the magnetometer info in the Go App what it's telling you is based on the field strength; it can't know that the field direction is wrong. The only way for the pilot to know this situation exists is to visually look at the AC and determine it's heading relative to magnetic north. Then compare that with the heading presented by the Go App display; i.e. which direction is the red triangle pointing. Do you recall the AC's heading prior to launch. I'll bet that you pointed it away from your office pointing 72 degrees. If you look on the replay you should see the initial heading -91 degrees
Having said this let me say that I never make this visual check; it's too much of a hassle. But, having seen several of these events has caused me to always think about the possibility of geomagnetic distortion at the launch site. My flying buddy never thinks about this though; and is probably tired of hearing me tell him to worry about it.
This type of compass error can't be directly measured. E.g., it's not like the magnetometers quit altogether. In this particular situation all the AC really knows is that Yaw and magYaw don't agree. It can't know which one is correct. Anyway, the crux is that this type of compass error has to be inferred which then admits the possibility of mistakes. Either a false positive, or not detecting a compass error when one exists. In the case of the P3, it seems that with every firmware update more false positives would occur. The P3 would detect an error, switch to ATTI, and then expect the pilot to do the navigating. With the Mavic it seems the strategy is to reconcile these errors by remaining in GPS_ATTI and continuing to navigate. Doesn't always work so well as you can see. Maybe this strategy will improve with future firmwares.
The Mavic was responding to your control inputs. But, it was also responding to it's own navigation directives. I.e., you and the Mavic were both controlling it. Maybe a distinction without a difference since you may not have had enough control to navigate it effectively.
As to the question of a possible compass malfunction. IMHO the odds are very low. Such a malfunction would have to resolve itself just as the Mavic is leaving the launch site.