BUG: Fix regression for groupby.indices in case of unused categories
- [x] closes #38642
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

 To show the unused we categories, we can dispatch back as we did before #36842. Since Categorical does not support nan, the reason for the switch does not exist in this case. I think handling unused categories in ``get_indexer_dict`` is not desirable, because it would introduce a lot of convolution for one corner case we could handle here pretty easily.
Since we are only using ``indices`` in grouper only for categoricals, we do not have to worry about sorting as the test shows.

cc @jorisvandenbossche @mroeschke 