The newer tokenizer can not tokenize pad_token to pad_token_id
Author: Magicalyz
Pull request: no

### System Info

- `transformers` version: 4.36.0
- Platform: Linux-5.4.143.bsk.7-amd64-x86_64-with-glibc2.31
- Python version: 3.9.2
- Huggingface_hub version: 0.20.2
- Safetensors version: 0.4.1
- Accelerate version: 0.25.0
- Accelerate config:    not found
- PyTorch version (GPU?): 2.1.0+cu122 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

### Who can help?

Recently I upgrade my transformer from 4.31.0 to 4.36.0, then I found out the newer tokenizer can not tokenize pad_token to pad_token_id due to this code.https://github.com/huggingface/transformers/blob/039866094cb1c72f224049d4d006154ad0d6eda7/src/transformers/tokenization_utils.py#L600
```python
if tok_extended.single_word and left and left[-1] != " ":
  tokens[i - 1] += token
  tokens[i] = ""
elif tok_extended.single_word and right and right[0] != " ":
  tokens[i + 1] = token + tokens[i + 1]
  tokens[i] = ""
```
Here is my test code:
```python
tokenizer = AutoTokenizer.from_pretrained(
                    "baichuan-inc/Baichuan-13B-Chat", trust_remote_code=True
                )
print(tokenizer("
This is a test sentence"))
#output(transformers==4.36.0): {'input_ids': [1557, 31114, 31219, 1523, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1]}
#output(transformers==4.31.0): {'input_ids': [1, 1170, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1]}
print(tokenizer("
 This is a test sentence"))
#output(transformers==4.36.0): {'input_ids': [1, 99, 1523, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1, 1]}
#output(transformers==4.31.0): {'input_ids': [1, 99, 1523, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1, 1]}
```
I'm wondering why there must be blank spaces between special_tokens, is there any rules to follow about add pad_token in text?
Thanks for your help!
@ArthurZucker 

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

```python
tokenizer = AutoTokenizer.from_pretrained(
                    "baichuan-inc/Baichuan-13B-Chat", trust_remote_code=True
                )
print(tokenizer("
This is a test sentence"))
#output(transformers==4.36.0): {'input_ids': [1557, 31114, 31219, 1523, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1]}
#output(transformers==4.31.0): {'input_ids': [1, 1170, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1]}
print(tokenizer("
 This is a test sentence"))
#output(transformers==4.36.0): {'input_ids': [1, 99, 1523, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1, 1]}
#output(transformers==4.31.0): {'input_ids': [1, 99, 1523, 715, 650, 1801, 10583], 'attention_mask': [1, 1, 1, 1, 1, 1, 1]}
```

### Expected behavior

tokenize pad_token to pad_token_id

Comments:
Hello! Thanks for raising this issue! This is using a custom code, I would recommend you to open this issue on the repo's discussion tab! 🤗 
There were a few changes, but I think the tokenizer's remote code is the issue here. With LlamaTokenizer there is no such issue! (The token is normalized) 

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.