### 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
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static org.elasticsearch.common.Strings.cleanTruncate;
import static org.elasticsearch.common.Strings.collectionToDelimitedString;
import static org.elasticsearch.common.Strings.collectionToDelimitedStringWithLimit;
import static org.elasticsearch.common.Strings.deleteAny;
import static org.elasticsearch.common.Strings.delimitedListToStringArray;
import static org.elasticsearch.common.Strings.hasLength;
import static org.elasticsearch.common.Strings.hasText;
import static org.elasticsearch.common.Strings.isAllOrWildcard;
import static org.elasticsearch.common.Strings.isEmpty;
import static org.elasticsearch.common.Strings.padStart;
import static org.elasticsearch.common.Strings.spaceify;
import static org.elasticsearch.common.Strings.substring;
import static org.elasticsearch.common.Strings.toLowercaseAscii;
import static org.elasticsearch.common.Strings.tokenizeByCommaToSet;
import static org.elasticsearch.common.Strings.trimLeadingCharacter;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.arrayContaining;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.emptyArray;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasToString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
public class StringsTests extends ESTestCase {