Looks like https://github.com/elastic/elasticsearch/issues/37898 but that issue has been closed for years so I'm opening a fresh one.

**Build scan:**
https://gradle-enterprise.elastic.co/s/apnlznuk3yp5q/tests/:server:internalClusterTest/org.elasticsearch.index.mapper.DynamicMappingIT/testConflictingDynamicMappings

**Reproduction line:**
```
./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.index.mapper.DynamicMappingIT.testConflictingDynamicMappings" -Dtests.seed=20124EB0BA787503 -Dtests.locale=ar-YE -Dtests.timezone=Atlantic/Cape_Verde -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.index.mapper.DynamicMappingIT&tests.test=testConflictingDynamicMappings

**Failure excerpt:**
```
java.lang.IllegalArgumentException: mapper [foo] cannot be changed from type [long] to [text]

  at __randomizedtesting.SeedInfo.seed([20124EB0BA787503:42F708BE625A906B]:0)
  at org.elasticsearch.index.mapper.FieldMapper.checkIncomingMergeType(FieldMapper.java:377)
  at org.elasticsearch.index.mapper.FieldMapper.merge(FieldMapper.java:362)
  at org.elasticsearch.index.mapper.FieldMapper.merge(FieldMapper.java:57)
  at org.elasticsearch.index.mapper.ObjectMapper.doMerge(ObjectMapper.java:515)
  at org.elasticsearch.index.mapper.RootObjectMapper.doMerge(RootObjectMapper.java:213)
  at org.elasticsearch.index.mapper.ObjectMapper.merge(ObjectMapper.java:467)
  at org.elasticsearch.index.mapper.RootObjectMapper.merge(RootObjectMapper.java:208)
  at org.elasticsearch.index.mapper.Mapping.merge(Mapping.java:139)
  at org.elasticsearch.index.mapper.MapperService.mergeMappings(MapperService.java:366)
  at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:334)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:368)
  at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:219)
  at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:286)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:137)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:74)
  at org.elasticsearch.action.support.replication.TransportWriteAction$1.doRun(TransportWriteAction.java:214)
  at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)
  at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  at java.lang.Thread.run(Thread.java:1623)

```
server/src/internalClusterTest/java/org/elasticsearch/index/mapper/DynamicMappingIT.java
assertFalse(bulkItemResponses.buildFailureMessage(), bulkItemResponses.hasFailures());
        {
            SearchResponse searchResponse = client().prepareSearch("test").setQuery(new MatchQueryBuilder("obj.one", 1)).get();
            assertEquals(1, searchResponse.getHits().getTotalHits().value);
        }
        {
            SearchResponse searchResponse = client().prepareSearch("test").setQuery(new MatchQueryBuilder("anything", "anything")).get();
            assertEquals(1, searchResponse.getHits().getTotalHits().value);
        }
        {
            SearchResponse searchResponse = client().prepareSearch("test").setQuery(new MatchQueryBuilder("obj.runtime.one", "one")).get();
            assertEquals(1, searchResponse.getHits().getTotalHits().value);
        }
        {
            SearchResponse searchResponse = client().prepareSearch("test")
                .setQuery(new MatchQueryBuilder("obj.runtime.one.two", "1"))
                .get();
            assertEquals(1, searchResponse.getHits().getTotalHits().value);
        }
        Exception exception = expectThrows(
            DocumentParsingException.class,
            () -> client().prepareIndex("test").setSource("obj.runtime", "value").get()
        );
        assertThat(
            exception.getMessage(),
            containsString("object mapping for [obj.runtime] tried to parse field [runtime] as object, but found a concrete value")
        );
        assertAcked(client().admin().indices().preparePutMapping("test").setSource("""
            {
              "_doc": {