Created attachment 139968 [details] Example Example: https://docs.krita.org/en/user_manual/getting_started/basic_concepts.html#animation (Haven't checked if there are other instances.)
That sounds like we either need to hack the theme or remove links that are headers :|
There is also another interesting behaviour with that: the link on the page-top table of contents goes to the referenced page instead of the section in the current page.
Related upstream bug report: https://github.com/sphinx-doc/sphinx/issues/9561
Let's mark as upstream.