DarkMode Redrawing issues (when using WindowsViewControllerMBS)

Please see this screenshot. It’s a titleless window displayed as a popup using WindowsViewControllerMBS.
You see that the upper TabPanel displays the selected item with a too bright color (only the first one gets the correct color like in the lower panel). Additionally, a lighter frame shows below it.

The big box is a TextArea with VerticalScroller enabled. Which will always show as a gray box.

If I switch to bright mode, everything draws correctly.
The same window displayed as window alone, or as a sheet via Controller, will not show any artefacts. (2nd screenshot)

Any idea what might be the reason?

Replying myself: Was a good idea to post the screenshots. I noticed that that window is sized down a bit when displayed as popup. Maybe it helps if I try to size it to the displayed format.
Are there any defaults for the size of a Popup? Or does the headless mode confuse the ViewController? I noticed I have to resize my fused toolbar main window even though I use Apple’s WindowFrameSave property. Maybe because of the code in the open event causing a different contentView size.(??)

Nope, doesn’t change anything. The only workaround I found is not to use this window as a popup.