Fix groupby-resample KeyError when resampling on Index and giving explicit list of columns.
- [x] closes #50840 (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Related #50841 
This PR is for the main branch, #50841 is for a fix to the 1.5.x branch.  @mroeschke, here are  the same changes, but on the main branch.
Let me know if there is anything else you need from me. There is one failing check, but from the error log I think this has nothing to do with my changes. Can anyone comment on why Ubuntu / Numpy Dev is failing? [link](https://github.com/pandas-dev/pandas/actions/runs/3964425510/jobs/6793275375) Sure, I'll just revert the last commit. @mroeschke , I was typing up that question as I didn't see `unittest` used anywhere else in the project, but you were super quick on the review :) Is there anything else I should do for this PR or can I consider my portion of the work done? Thanks @czroth 