in groupby sorting index when length of groupings is one
#### Reference Issues/PRs
Example: Fixes #27369  "Bug: groupby(..., observed=True) doesn't respect sort keys"


#### What does this implement/fix? Explain your changes.
Sorts the index when the length of groupings is one (if `sefl.sorted` equals `True`)



Can you add a test for the behavior you are fixing? @camilaagw can you add a test and merge master? I think this is stale but @camilaagw feel free to ping if you'd like to pick back up