Due to the way prosemirror works, the naive implementation of links clears the style when the link text is updated.
If possible, use prosemirror methods to retain link style when updated. At the very least, styles that apply to the whole link text should be retained.