Can all compasses be turned off?

Can all compasses be turned off
I have tested that when the compass interferes, the plane crashes like being drunk. To avoid this kind of crash, can we simply turn off the compass
If there is no compass in Alt Hold mode, it can avoid compass interference caused by close proximity to steel structures. Turning off the compass can actually increase safety. It can make the helicopter fly like an FPV, and without a compass, it is actually safer.
In LOIter mode, I used two F9P RTKs to control heading, which is safer without the intervention of a compass.
So can we directly disable all the functions of the compass? For me, having no compass is actually safer.

Does Alt Hold require a compass? - ArduCopter / Copter 3.2 - ArduPilot Discourse

According to the link, the compass is used to correct heading in Alt Hold mode. Can I set EK3_SRC1_YAW=0 in Alt Hold mode to avoid using the compass.
Then I set EK3_SRC1_YAW=2 in LOiter mode
Can this completely avoid the use of a compass in any situation. Because my usage environment may cause interference with the compass.

If you have heading from dual-GPS working in loiter - it will also work in all other modes. You should be able to setup the compass to only be used as a backup to loss of PGS (or turn it completely off if you wish). If you lose a source of yaw sensing during alt-hold mode, it will fly just fine but may slowly drift in yaw which could be easily corrected by pilot input.

Yes, if I want to use alt hold mode, it means I must be using it indoors or without GPS. There is a high possibility of the compass being interfered with. For example, once I was flying in a steel parking lot and the compass was constantly interfered with, even the alt hold could not fly safely. In this case, can I set EK3_SRC1_YAW=0 to solve this problem.
Using RTK in LOITER mode doesn’t require a compass at all, so using an environmental compass is actually the least safe for me. So I need to disable the function of the compass under any circumstances.

I think this is what you are looking for in terms of what params to change:

https://ardupilot.org/copter/docs/common-compassless.html

If you’re using moving baseline for yaw, just set all compass enable/use parameters to 0 and direct the EKF to use GPS only. It works fine.