As I have also something fishy going on with Cube Orange internal compass (board mounted Yaw180) and Here3 - so I tested AHRS_ORIENTATION effect on Cube Orange with internal compass.
It only has effect if you recalibrate IMUs and re-level vehicle after changing AHRS_ORIENTATION (applies only to Cube internal compass).
In my case I have strange problem that compass is ~10-20 degrees off compared to phone compass as a reference.
Im starting to think that AHRS_ORIENTATION: 4 (Yaw180) and COMPASS_ORIENT: 0 (Here3 in flight direction) cannot work together. Even if I only enable external ie Here3 compass - the compass orientation is off by a large scale (~40-140 degrees or so).
The only case when Here3 starts to point into somewhat right direction (ie by having no more than 20 degree variance to phone or internal compass) is when I orient Here3 also Yaw180 physically - and both AHRS_ORIENTATION: 4 for internal compass and COMPASS_ORIENT: 4 are set.
Bug in Arduplane 4.0.9 maybe? @Alvin - any thoughts?