MIDI Devices closing when hiding sidepanel

I have a sidepanel that I’m using as a preferences menu. Within the sidepanel is a tabbedcomponent with 4 tabs, one is for MIDI I/O device selection. I have no problem opening a connection to devices while the sidepanel is visible, however the connections disappear once the sidepanel is hidden. Here are the relevant blocks of code for the sidepanel/tabbedcomponent:

juce::SidePanel sidepanelPreferences { "PREFERENCES", 1000, false, nullptr, false };

PluginEditor.cpp constructor:

auto sidePanelPreferencesBody = new PreferencesEditor();
sidepanelPreferences.setContent(sidePanelPreferencesBody, false);
sidePanelPreferencesBody->preferencesDismissButtonClicked([&]() { preferencesDismissButtonClicked(); } );


    tabs.addTab("GLOBAL",     juce::Colours::transparentBlack, new globalPrefs, false);
    tabs.addTab("MIDI I/O",   juce::Colours::transparentBlack, new midiPrefs, false);
    tabs.addTab("LED STRIPS", juce::Colours::transparentBlack, new ledPrefs, false);
    tabs.addTab("TRIGGERS",   juce::Colours::transparentBlack, new triggersPrefs, false);

When the sidepanel is closed, the “preferencesDismissButtonClicked” function just calls this, and nothing else:

My MIDI prefs .h & .cpp files are taken verbatim from the MidiDemo.h example. I just removed the keyboard component & midi messages readout, so all that’s left is the midi in & out device listboxes.

Is there anything I can do to keep the MIDI device connections open when the sidepanel is hidden?