Ah, sorry. By “outside” in the title I meant that they work from, say, a notification email. Then I realized they also work when opening a new tab or window. You can see this with the link in my first reply. Clicking on it while already on the page gets to the top of the topic. If you open it in a new tab, it opens with the heading at the top as expected.
As to the previous bug report: unfortunately, none of the links in this work now. Also, it is from 2022 - this is not the kind of edge case bug that goes unfixed for that long?
I hope I am not holding the wrong end of the stick here. I was able to reproduce the problem on try.discourse.org, on meta.discourse.org as well as our own hosted forum.