Internal links disappear after certain kinds of edits made elsewhere

Steps to reproduce

Unfortunately I cannot reproduce the bug for now, but will let you know when I can.

This has already been mentioned by someone else here:

Basically, when a paragraph contains internal links, there is some kind of editing done on the paragraph (but not on the links) that will make the links disappear. There must be some code to remove links (not sure when it is legitimately used) and it can be wrongly triggered when doing edits in the paragraph.

I know you only want reproducible bugs. It just happened to me again and I just spent 15 minutes trying to reproduce it but couldn’t do it. Next time it happens (it happens to me perhaps once a week) I’ll try to see exactly what was done, and try to reproduce it in the sandbox vault.

Moved to Help for now.

I could reproduce it, see here: