TST: Add test for union with duplicates
- [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


> pandas/core/indexes/base.py:3003: error: unused 'type: ignore' comment Thx @jbrockmendel 

Could add a test additionally but no typing anymore thanks @phofl 