test: Add test for loc assignment changes datetime dtype
- [x] closes #49837
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

@phofl ping 
Thanks for the review! thx @alonme 