Looks like https://github.com/elastic/elasticsearch/issues/86382 but that should have been fixed in May.

**Build scan:**
https://gradle-enterprise.elastic.co/s/xb7cxwzdk6es6/tests/:libs:elasticsearch-core:test/org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests/classMethod

**Reproduction line:**
`null`

**Applicable branches:**
main

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

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests&tests.test=classMethod

**Failure excerpt:**
```
java.io.IOException: Could not remove the following files (in the order of attempts):
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001\parent.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001\parent.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentNonPkgName-001
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001\parent.jar: java.nio.file.FileSystemException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001\parent.jar: The process cannot access the file because it is being used by another process
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001\testResourcesParentJavaPkgName-001
   C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\253\libs\core\build\testrun\test\temp\org.elasticsearch.core.internal.provider.EmbeddedImplClassLoaderTests_E8BB9E0290B7F7A7-001

  at __randomizedtesting.SeedInfo.seed([E8BB9E0290B7F7A7]:0)
  at org.apache.lucene.util.IOUtils.rm(IOUtils.java:341)
  at org.apache.lucene.tests.util.TestRuleTemporaryFilesCleanup.afterAlways(TestRuleTemporaryFilesCleanup.java:209)
  at com.carrotsearch.randomizedtesting.rules.TestRuleAdapter$1.afterAlways(TestRuleAdapter.java:31)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:833)

```
libs/core/src/test/java/org/elasticsearch/core/internal/provider/EmbeddedImplClassLoaderTests.java
jarEntries.put("IMPL-JARS/blah/bar.jar/META-INF/MANIFEST.MF", "Multi-Release: True\n".getBytes(UTF_8));
        jarEntries.put("IMPL-JARS/blah/bar.jar/META-INF/versions/9/q/Bar.class", classToBytes.get("q.Bar"));
        jarEntries.put("IMPL-JARS/blah/baz.jar/META-INF/MANIFEST.MF", "Multi-Release: true\n".getBytes(UTF_8));
        jarEntries.put("IMPL-JARS/blah/baz.jar/META-INF/versions/11/r/Baz.class", classToBytes.get("r.Baz"));
        Path topLevelDir = createTempDir(getTestName());
        Path outerJar = topLevelDir.resolve("impl.jar");
        JarUtils.createJarWithEntries(outerJar, jarEntries);
        URL[] urls = new URL[] { outerJar.toUri().toURL() };
        URLClassLoader parent = URLClassLoader.newInstance(urls, EmbeddedImplClassLoaderTests.class.getClassLoader());
        try {
            EmbeddedImplClassLoader loader = EmbeddedImplClassLoader.getInstance(parent, "blah");
            Class<?> c = loader.loadClass("p.Foo");
            Object obj = c.getConstructor().newInstance();
            assertThat(obj.toString(), startsWith("p.Foo"));
            assertThat(c.getSuperclass().getName(), is("q.Bar"));
            assertThat(c.getSuperclass().getSuperclass().getName(), is("r.Baz"));
            
            expectThrows(CNFE, () -> loader.loadClass("p.Unknown"));
            expectThrows(CNFE, () -> loader.loadClass("q.Unknown"));
            expectThrows(CNFE, () -> loader.loadClass("r.Unknown"));
        } finally {
            PrivilegedOperations.closeURLClassLoader(parent);
        }
    }
    /*
     * Tests resource lookup across multiple embedded jars.
     */
    public void testResourcesWithMultipleJars() throws Exception {
        Path topLevelDir = createTempDir(getTestName());
        Map<String, String> jarEntries = new HashMap<>();