### CI Link

https://gradle-enterprise.elastic.co/s/323cgxy7itfky

### Repro line

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.elasticsearch.common.StringsTests.testDeleteAny" -Dtests.seed=8A64C9DD086550D3 -Dtests.locale=it -Dtests.timezone=Asia/Baghdad -Druntime.java=17	

### Does it reproduce?

Yes

### Applicable branches

main

### Failure history

https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Rome&tests.container=org.elasticsearch.common.StringsTests&tests.test=testDeleteAny

### Failure excerpt

```
java.lang.AssertionError: |  
  | Expected: "짞ĐGⰣ*ﮢ" |  
  | but: was "짞ĐGⰣﮢ"
```
server/src/test/java/org/elasticsearch/common/StringsTests.java
assertThat(delimitedListToStringArray(testStr = randomAlphaOfLength(10), null, "a"), arrayContaining(testStr));
        assertThat(
            delimitedListToStringArray(testStr = randomAlphaOfLength(10), "", null),
            arrayContaining(testStr.chars().mapToObj(Character::toString).toArray())
        );
        assertThat(
            delimitedListToStringArray("bcdabceabcdf", "", "a"),
            arrayContaining("b", "c", "d", "", "b", "c", "e", "", "b", "c", "d", "f")
        );
        assertThat(
            delimitedListToStringArray("bcdabceabcdf", "", "da"),
            arrayContaining("b", "c", "", "", "b", "c", "e", "", "b", "c", "", "f")
        );
        assertThat(
            delimitedListToStringArray("abcdabceabcdf", "", "da"),
            arrayContaining("", "b", "c", "", "", "b", "c", "e", "", "b", "c", "", "f")
        );
        assertThat(delimitedListToStringArray("abcd,abce,abcdf", ",", "da"), arrayContaining("bc", "bce", "bcf"));
        assertThat(delimitedListToStringArray("abcd,abce,abcdf,", ",", "da"), arrayContaining("bc", "bce", "bcf", ""));
        assertThat(delimitedListToStringArray("abcd,abce,abcdf,bcad,a", ",a", "d"), arrayContaining("abc", "bce", "bcf,bca", ""));
    }
    public void testCollectionToDelimitedStringWithLimitZero() {
        final String delimiter = randomFrom("", ",", ", ", "/");
        final String prefix = randomFrom("", "[");
        final String suffix = randomFrom("", "]");
        final int count = between(0, 100);
        final List<String> strings = new ArrayList<>(count);
        while (strings.size() < count) {
            
            final int minLength = strings.isEmpty() && delimiter.isEmpty() && prefix.isEmpty() && suffix.isEmpty() ? 1 : 0;