Apple Maps direction wrong, Compass app accurate on iPhone
Some apps (like Apple Maps) show the phone pointing in the wrong direction, even though the Compass app knows which direction the phone is pointing in.
You can see what happens in this screen-recorded video:
I start with the phone pointing due south. Apple Maps shows the directional pointer pointing south. Switch to the compass app. Rotate the physical phone so that it's pointing east. Note that the compass registers correctly that I've rotated the phone. Switch back to Apple Maps. The directional pointer still (incorrectly) shows the phone pointing south. I know it's not frozen, since if I move slightly south you can see the blue location dot moving.
Screen shots from the video:
This is bizarre to me because I would have just assumed that both the Compass app and the Maps app would make the same OS API call to figure out which way the phone is pointing, so I would never have expected one of them to be right but not the other one. Presumably this means most of the standard compass "troubleshooting" steps (no metal objects, no magnetic phone cases, etc.) don't apply, because the Compass app does know which way the phone pointing. What's going on and can it be fixed?
This is preventing other apps like Moon Tracker from working properly for me because I want to know when the moon will be at a certain spot in the sky but the app sometimes doesn't know which way the phone is pointing even when the compass does.
In Settings -> General -> Privacy and Security -> Location Services, the "Compass" app has settings enabled "Allow Location Access: While Using the App" and "Precise Location" is enabled. The Maps application has similar settings enabled: "Allow Location Access: While Using the App or Widgets" and "Precise Location" is enabled (along with access to "Preferred Routes & Predicted Destinations" and "Visited Places" which I assume is not relevant here). Also under Location Services -> System Services, "Compass Calibration" and "Motion Calibration & Distance" are both enabled, since some troubleshooting steps refer to those.
(The compass also appears to be slightly off -- I'm holding the phone pointing straight south and the compass is off by a few degrees -- but I assume that's a separate problem.)
iPhone 15, iOS Version 26.3.1(a).