Show editor selection while another input is being focused

Hi, currently in my menu for the editor, I have a ‘link’ button that, when clicked, shows a menu to input the text, link, etc. Upon clicking on any of these inputs, the editor loses focus and its selection styling (although the selection itself is fine), which I think makes sense since it now has the focus instead of the editor. I was wondering if there’s any workaround that can keep the selection’s styling while focusing on another input?

The browser will only show selection in the focused element, so to do this you’d have to add a decoration that styles the selection to look like it is selected (and preferably, to only show that when the editor isn’t focused, for example by clearing the styles when a descendant of ProseMirror-focused).