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`)


