TST: Adding unit tests for named indexes resulting from empty datafra…
…me shifts

- [x] closes #41264
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

Tests added for issue: https://github.com/pandas-dev/pandas/issues/41264