I’ve had this issue - the fix is to lock and then unlock your phone and the compass should be pointing in the right direction. Strange but true.