Add fix to raise error when category value 'x' is not predefined but is assigned through df.loc[..]=x
- [X] closes #25383
- [X] tests passed, new test added
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`