BUG: Fix unwanted type casting while replacing values in a DataFrame
- [x] closes #32988
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

As mentioned in #32988 [here](https://github.com/pandas-dev/pandas/issues/32988#issuecomment-604727057) I think, that I have found a way to fix this, but I don't know, if this results in a desired behavior. 

I would add tests after ensuring, that this does not break anything else. 

Any thoughts about this?