Gutenberg Modify core taxonomy panel element via wp.hooks.addFilter

Because your plugin handles both hierarchical and non-hierarchical taxonomies, then I think it might be a better option to copy the HierarchicalTermSelector component, and return the copy from the CustomizeTaxonomySelector function.

And you can see how I did it hereUpdated to use the JavaScript Build Setup which makes things like transpilation super easy.

The plugin (or the JavaScript stuff) is not perfect, but it should be good enough as a starting point. And you’d see something like these:

PS: In the demo, the category “Test” and tag “Test” share the same name, but they’re of a different taxonomy. And the same goes to the category “Test 2” and tag “Test 2”.