### Elasticsearch Version

8.5.0

### Installed Plugins

_No response_

### Java Version

elastic.co customer

### OS Version

elastic.co customer

### Problem Description

Dynamic mapping eagerly interprets a string with this format `2021-51` as a date field, but then fails to index due to 51 not being a valid month.

Expected behaviour would be to index `2021-51` as a text field.

### Steps to Reproduce

With [dynamic mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-mapping.html) turned on attempt to index this document in a fresh, empty index:

```http
POST /bugreport/_doc
{
  "not_a_date": "2022-51"
}
```

Returned error message is:
```json
{
  "error": {
    "root_cause": [
      {
        "type": "date_time_exception",
        "reason": "date_time_exception: Invalid value for MonthOfYear (valid values 1 - 12): 51"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse field [not_a_date] of type [date] in document with id 'U1f9Y4YBXO70bNmhk658'. Preview of field's value: '2022-51'",
    "caused_by": {
      "type": "date_time_exception",
      "reason": "date_time_exception: Invalid value for MonthOfYear (valid values 1 - 12): 51"
    }
  },
  "status": 400
}
```

### Logs (if relevant)

Mappings on index `bugreport`

```http
GET /bugreport/_mapping
```

```json
{
  "bugreport": {
    "mappings": {}
  }
}
```
server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.Query;
import org.elasticsearch.Version;
import org.elasticsearch.common.Explicit;
import org.elasticsearch.common.regex.Regex;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.index.fielddata.FieldDataContext;
import org.elasticsearch.index.fielddata.IndexFieldDataCache;
import org.elasticsearch.index.query.SearchExecutionContext;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.search.lookup.SearchLookup;
import org.elasticsearch.search.lookup.Source;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xcontent.XContentParserConfiguration;
import org.elasticsearch.xcontent.XContentType;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
/**
 * A parser for documents
 */
public final class DocumentParser {