### Elasticsearch Version

8.2.0

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

docker-image = docker.elastic.co/elasticsearch/elasticsearch:8.2.0

### Problem Description

We are trying to migrate from Elasticsearch 6.7.1 to Elasticsearch 8.2.0.

With the same amount of documents per bulk request (100 docs per request), we always get a socket timeout in Elasticsearch 8.2.0. Everything works fine in Elasticsearch 6.7.1.

I noticed that indexing the same document in Elasticsearch 8.2.0 takes 44152ms. In Elasticsearch 6.7.1, indexing takes 50ms.

### Steps to Reproduce

[elasticsearch_8.2.0.txt](https://github.com/elastic/elasticsearch/files/8754299/elasticsearch_8.2.0.txt)
[elasticsearch_6.7.1.txt](https://github.com/elastic/elasticsearch/files/8754300/elasticsearch_6.7.1.txt)



### Logs (if relevant)

_No response_
server/src/test/java/org/elasticsearch/index/mapper/CopyToMapperTests.java
assertThat(copyToList.get(0), equalTo("another_field"));
        assertThat(copyToList.get(1), equalTo("cyclic_test"));
        ParsedDocument parsedDoc = mapperService.documentMapper().parse(source(b -> {
            b.field("copy_test", "foo");
            b.field("cyclic_test", "bar");
            b.field("int_to_str_test", 42);
        }));
        LuceneDocument doc = parsedDoc.rootDoc();
        assertThat(doc.getFields("copy_test").length, equalTo(2));
        assertThat(doc.getFields("copy_test")[0].stringValue(), equalTo("foo"));
        assertThat(doc.getFields("copy_test")[1].stringValue(), equalTo("bar"));
        assertThat(doc.getFields("another_field").length, equalTo(2));
        assertThat(doc.getFields("another_field")[0].stringValue(), equalTo("foo"));
        assertThat(doc.getFields("another_field")[1].stringValue(), equalTo("42"));
        assertThat(doc.getFields("cyclic_test").length, equalTo(2));
        assertThat(doc.getFields("cyclic_test")[0].stringValue(), equalTo("foo"));
        assertThat(doc.getFields("cyclic_test")[1].stringValue(), equalTo("bar"));
        assertThat(doc.getFields("int_to_str_test").length, equalTo(1));
        assertThat(doc.getFields("int_to_str_test")[0].numericValue().intValue(), equalTo(42));
        assertThat(doc.getFields("new_field").length, equalTo(2)); 
        assertThat(doc.getFields("new_field")[0].numericValue().intValue(), equalTo(42));
        assertNotNull(parsedDoc.dynamicMappingsUpdate());
        merge(mapperService, dynamicMapping(parsedDoc.dynamicMappingsUpdate()));
        fieldMapper = mapperService.documentMapper().mappers().getMapper("new_field");
        assertThat(fieldMapper.typeName(), equalTo("long"));
    }
    public void testCopyToFieldsInnerObjectParsing() throws Exception {
        DocumentMapper docMapper = createDocumentMapper(mapping(b -> {
            b.startObject("copy_test");
            {