What can cause magnetometer offset to be variable?
External iron objects, such as desks, chairs, building structures, etc. will also warp the Earth's magnetic field. You should be a few meters away from these objects when calibrating the sensor, as they may be causing the interference.
Some magnetometers (e.g. FXOS8700) can automatically perform hard-iron offset using a simple max-min algorithm. If the field is varying between tests it may be the sensor / phone is automatically calculating new offsets.


Try doing the experiment outside away from any iron.