This must be the weirdest bug I have ever seen. Fully reproducible though.
Patch your qtwebengine/examples/webenginewidgets/demobrowser to add this at the end of BrowserApplication::postLaunch:
then launch demobrowser (on any website), and you should see something very strange when the palette changes, a copy of the rendering of the tabbar and of the bottom toolbar appears inside the webengine rendering.
It's like there's an offset in the rendering or something.
Patch attached for convenience, as well as screenshot for clarity.
BTW this usually rapidly ends with this assert, e.g. after resizing the window.
ASSERT: "!d->offscreenWindow->handle()" in file /d/qt/5/kde/qtdeclarative/src/quickwidgets/qquickwidget.cpp, line 985