You can modify the category dropdown and have it only show unrestricted categories. You can also create another component that “extends” it and have that only show restricted categories.
All of that would only need a few lines of code, and it’s future-proof.
I do have a tiny question before we get into that. How would this work in the composer? Do you want that separation to also exist when users create a topic, or are you OK with having both “spaces” and “groups” being in the same dropdown in the composer?