Should always set the pad_to_max_length =False when do whole word mask language model fine-tune
### Feature request

I am researching some work about whole word mask language model fine-tune and I am doing some customize change on the code from the official example (https://github.com/huggingface/transformers/tree/main/examples/research_projects/mlm_wwm)

I find there is a argument field in class DataTrainingArguments    
pad_to_max_length: bool = field(
        default=False,
        metadata={
            "help": (
                "Whether to pad all samples to `max_seq_length`. "
                "If False, will pad the samples dynamically when batching to the maximum length in the batch."
            )
        },
    )

although its default value is False, but when we set it to True, it will make some problem when we use the  DataCollatorForWholeWordMask collator.

### Motivation

according to the source code about DataCollatorForWholeWordMask, I think it selects the tokens to be masked among all input_tokens, if we do padding before collator processing, then during the word mask process we may get lots of candidate index with PAD token. I believe this kind of PAD token is no meaning for word mask model fine tune.

Although the default value pad_to_max_length is set to False, but I do found lot of people customize the code from the official examples by set tokenizer.padding to "max_length" and then call the map function on dataset.

   def tokenize_function(examples):
        # Remove empty lines
        examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()]
        return tokenizer(examples["text"], padding="max_length", truncation=True, max_length=data_args.max_seq_length)

    tokenized_datasets = datasets.map(
        tokenize_function,
        batched=True,
        num_proc=data_args.preprocessing_num_workers,
        remove_columns=[text_column_name],
        load_from_cache_file=not data_args.overwrite_cache,
    )

### Your contribution

I suggest to remove the padding action before the DataCollatorForWholeWordMask collator process and emphasize that padding action before the collator process may influence the training of our model.
Note that this is not a maintained example, so we are not planning on making any changes to that script.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.