fix bugs cause replacer's dtype not respected
- [x] closes  #26632
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

I need some assistance here. #26632  > I need some assistance here. #26632

?

this PR looks good. if you'd merge master and add a whatsnew note > can we just move 2834 here?

I propose an alternative approach in my previous comment. Does it look better ? lgtm @peterpanmj can you merge master and ping on green. Thanks @peterpanmj 