Durandal GPS issue - All compasses get external marked

Hi, I am facing an issue in which all the compasses get external marked on reboot.
I am using Durandal Flight Controller in my quadcopter with Pixhawk 4 GPS Module. The GPS is connected to the Flight controller via standard 10 pin cable. The external GPS is identified and given top priority. Calibration is performed successfully but after the system is rebooted all the compasses get marked as external and could only be unmarked by setting COMASS_EXTERN2 = 0.However, even after setting COMPASS_EXTERN2 = 0, and doing a normal reboot the value is set back to 1 and the internal compass is checked as external. The copter however flies without any issues.
@andyp1per @dkemxr, your assistance is needed in this regards.

Best Regards,
Hamad Khan afridi

@rmackay9 and @Leonardthall your expertise are required in this regard. I am still facing this issue.