It would appear that when dragging Unity between monitors with different DPI settings (as described in https://github.com/marijnz/unity-toolbar-extender/issues/34) that the root visual element is detached, but m_currentToolbar does not become null.
To address this issue I registered for the DetachFromPanelEvent and clear the m_currentToolbar variable to trigger the setup process again.
It would appear that when dragging Unity between monitors with different DPI settings (as described in https://github.com/marijnz/unity-toolbar-extender/issues/34) that the root visual element is detached, but m_currentToolbar does not become null.
To address this issue I registered for the DetachFromPanelEvent and clear the m_currentToolbar variable to trigger the setup process again.