Links to headings seem to be broken on my end

What I’m trying to do

Im trying to link to a specific heading in a different note, but it doesnt show me all the headings there are in that note.

So i have a note with headings


to which im trying to link from a different note.
When i try it looks like this
2023-09-03_10-12
which is obviously not complete. Furthermore if i choose the second heading show and click on it the following pops up

which too seems to be just plainly wrong.

Things I have tried

-renaming and moving things around

For reference im on Linux and KDE.

Any help appreciated.

I have tested a bit more around my documents and its seems completely random which headings i can link and which i cant. For reference a file with 5 tier 2 headings


and i can only link to 4 of them(the second is missing)
2023-09-03_10-41_1

Am i missunderstanding something fundamentally?

Ok i seem to have found the source of the problem. It seems like sometimes for reasons completely and utterly alien to me the tex-markdown syntax interact extremly unituitively with each other only visible in reading mode. So it sometimes just happens that the parser in reading mode ( which seems to be the same as in outline ) just thinks the heading is still in math mode even though it really isnt. I have no more details at this point