Stop plugin module from shutting down

So my plugin is instantiated and starts up when its window is shown by clicking the button associated with it in the UI and shuts down when that window is closed I believe. I don’t want it to shut down when the window is closed and ideally it should load on startup, regardless of the layout being saved with its window open.

Is there any way to accomplish this?