BUG: GH41044 - test loc dict assig
- [x] closes #41044 
- [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
- [ ] whatsnew entry: not sure if it's needed but happy to provide one given some guidelines