Hey @gnitzan
That usually happens when you have too much of interference and compass gets inconsistent values. It tries to start from beginning again. Can you share a picture of the setup?
@Mallikarjun_SE how many compasses r there in cube+its gps? Isnt it better not to use the onboard cube compass to avoid interference by magnetic field of esc wires, like they removed the compass from APM2.5 and added the compass in gps only?
CubeBlack has 2 internal compass and Here2 has one. Yes, it is suggested to disable internal ones if the Cube is close to wires or PDB. You can always take a test flight with stabilize or althold mode and check how compasses are behaving. Then decide on disabling the ones which have interference.