Raise error if loss can't be calculated - ViT MIM 
# What does this PR do?

Currently, `ViTForMaskedImageModeling` will fail when calculating the reconstruction loss if a patch size other than 16 is chosen. This is because the decoder head is parametrized by `config.encoder_stride`, which controls the resolution of the upsampled image. 

By default, `config.patch_size = config.encoder_stride = 16`. If a user updates the patch size but not the encoder stride to match, the reconstructed image will have a different resolution. 

This PR adds a warning for the user before the forward pass, explaining why the loss calculation won't work.

Fixes #23832


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?

_The documentation is not available anymore as the PR was closed or merged._