@arminunruh
I found the issue.
The anchor IDs were present in the desktop layout, but I had forgotten to assign them to the corresponding elements in the mobile layout. Since Lay Theme uses separate desktop and mobile layouts, the mobile page simply had no matching anchor targets.
My bad!
After adding the IDs to the mobile layout, the navigation works correctly.
Thanks for taking the time to look into it!