REGR: groupby with as_index=False on an empty frame
- [x] closes #41998
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them

No whatsnew because this was introduced in 1.3

This looks right to me, but merits another pair of eyeballs this looks good, thanks @rhshadrach  @meeseeksdev backport 1.3.x Something went wrong ... Please have  a look at my logs.