TST: groupby of idxmax/min with mixed types
- [x] closes #40346
- [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
- [ ] whatsnew entry - didn't think this was necessary, just added a test case to a solved problem.

thanks @bsun94 