PluginGui shows as disabled but the window is shown and guis aren't drawn

I’m running into a glitch where my DockWidgetPluginGui is marked as Enabled = false, but the window is shown. However, the contents aren’t displayed until you close and re-open the GUI (or hit the run/stop buttons).

Has anyone run into this before? This code is my most likely culprit.

local gui = plugin:CreateDockWidgetPluginGui("SyncyTowne2", DockWidgetPluginGuiInfo.new());
gui.Title = "SyncyTowne";
gui.Name = "SyncyTowne";

However, copying & pasting that code into another plugin (with a different identity) doesn’t cause the problem to occur, so there’s something deeper going on.

Here’s some screencaps showing the problem.

Screencaps

Kinda just hoping someone has seen this problem before, since I have so little diagnostic info to go on. :stuck_out_tongue: