As you mentioned, this might be the reason.
It sounds like you are not putting the GPS in the box, am I correct?
In this case, disabling the Cube compasses should be the solution. Actually if you have a reliable GNSS unit, we usually recommend to turn off the Cube in-built compasses. Because they are too close to other components that generate interference.
You may try to disable the internal compasses in Compass Calibration page in Mission Planner, then calibrate it again.