The change in D14581 triggered the spawning of an additional header in QML KCMs in icon view mode.
The additional header was the header of the previously opened QWidgets KCM.
Sidebar view doesn't have this issue so I went and found the code that prevents the bug from happening and added it to icon view.
Given that icon view also has an additional sidebar when there's more than 1 category, a check also needed to be added so that we don't lose the sidebar.
BUG: 400876