It's the rich-text editor that's to blame. It's a piece of shit, but we're stuck with it. I recommend pressing the button at the top-left-hand corner of the reply box which switches to the plain-text editor (but also blanks out all the other buttons, for absolutely no reason whatsoever). That won't get the links back, but if you subsequently cancel your edit and then click the edit button again, it might work.
Test: