BUG/PERF: algos.union_with_duplicates losing EA dtypes
- [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
- [x] 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/v1.6.0.rst` file if fixing a bug or adding a new feature.


ASV added: 

```
       before           after         ratio
     [d76b9f2c]       [6760a19a]
     <main>           <union-with-duplicates>
-      18.6±0.2ms      5.53±0.07ms     0.30  index_object.UnionWithDuplicates.time_union_with_duplicates
```

thx @lukemanley 