Launching Modal Explicitly from Plugin Panel List

So I have a react panel plugin that launches a modal, which I put the .showModal() call inside the App’s componentDidMount() function. The issue is, when I back out of the plugin back to the list of installed ones in the panel, the modal no longer presents when clicking back into my plugin. Also if the plugin happens to be active and I open a new doc, it will present the modal.

Basically, I only want the modal to present when clicking on it from the main list of installed plugins. Is there some other place within the code to call showModal() or some other flow I should use?

This use case is basically same as any of React modal examples - https://github.com/AdobeXD/plugin-samples

Ok, but I see those are exclusively modal plugins only. I want to have a panel plugin as the “root” like using this from the PanelController:
this.instance = ReactDOM.render(<App selection={selection} />, this.rootNode);
but able to launch a first run modal from it.

Can you share a snippet of how you’re presenting the dialog?