yes, it's directly near the power line of one ESC
the powerline causes a magnetical field which affects the magneto readings
solution: move the magneto somewhere else, like on top of APM
Did you calibrate the magnetometer in the CLI, as instructed in the manual?
How much does the heading change when you change the roll or pitch by say 45 degrees? if it's 7~10 degrees or so that's normal. It's a bit inevitable that it changes that much and it's good enough to do your heading hold and GPS pos hold.
Also can you paste the offsets you see from the CLI Menu here? I strongly suspect that you didn't quite do the calibration correctly so your offsets are off.
The kinds of mag problems we see when it's really broken are:
1. it returns all zeros
2. it returns very shakey values (sometimes after a delay)
when it's the heading changing when you roll or pitch it's always the orientation or offsets.