Crabbing in Auto Loiter or Guided but heading correct in MP

The drone heading has an offset of about 20 deg off what I see on the MP and what the drone actually is doing .

if I fly straight north , the heading on the MP will show North , the drone will fly straight , but the real heading will be 20 deg , the mag is glued correct , and the declination is automatic.

I sometimes gets the MAG Anomaly MSG after takeoff, is it related?

Bad magnetometer data/(calibration) or placement