BUG: Fix wrong column selection in drop_duplicates when duplicate column names
- [x] closes #17836
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
