### CI Link

https://gradle-enterprise.elastic.co/s/6wrucnjdgjjdm https://gradle-enterprise.elastic.co/s/5c56fglmqlk4s https://gradle-enterprise.elastic.co/s/vwzb3ppw7p4ww https://gradle-enterprise.elastic.co/s/tqamvqdpkzzi4 https://gradle-enterprise.elastic.co/s/rniwyfcmjmkyi https://gradle-enterprise.elastic.co/s/k3xxqjli6mxye

### Repro line

Not provided

### Does it reproduce?

No

### Applicable branches

main

### Failure history

-

### Failure excerpt

Seemingly unrelated build tasks fail with "Unable to delete file" similar to

```
...

build complete, generating: C:\Users\jenkins\workspace\platform-support\253\build\253.tar.bz2

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\jenkins\workspace\platform-support\253\x-pack\plugin\security\qa\basic-enable-security\build.gradle' line: 67

* What went wrong:
Execution failed for task ':x-pack:plugin:security:qa:basic-enable-security:javaRestTestWithSecurityEnabled'.
> java.io.IOException: Unable to delete file 'C:\Users\jenkins\workspace\platform-support\253\x-pack\plugin\security\qa\basic-enable-security\build\testclusters\javaRestTest-0\config'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Failed to stop service 'reaper'.
> org.gradle.api.GradleException: Reaper process failed. Check log at C:\Users\jenkins\workspace\platform-support\253\.gradle\reaper\build-6028\error.log for details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 2h 16m 17s
3630 actionable tasks: 3402 executed, 228 from cache
```

Note that the console output usually presents a different exception but these are warnings and probably not the cause of the test failure.

All of the failed builds failed to delete some config in paths like `C:\Users\jenkins\workspace\platform-support\253\x-pack\plugin\security\qa\basic-enable-security\build\testclusters\javaRestTest-0\config`
build-tools/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java
private final ExecOperations execOperations;
    private final FileOperations fileOperations;
    private final AtomicBoolean configurationFrozen = new AtomicBoolean(false);
    private final Path workingDir;
    private final LinkedHashMap<String, Predicate<TestClusterConfiguration>> waitConditions = new LinkedHashMap<>();
    private final Map<String, Configuration> pluginAndModuleConfigurations = new HashMap<>();
    private final ConfigurableFileCollection pluginAndModuleConfiguration;
    private final List<Provider<File>> plugins = new ArrayList<>();
    private final List<Provider<File>> modules = new ArrayList<>();
    private final LazyPropertyMap<String, CharSequence> settings = new LazyPropertyMap<>("Settings", this);
    private final LazyPropertyMap<String, CharSequence> keystoreSettings = new LazyPropertyMap<>("Keystore", this);
    private final LazyPropertyMap<String, File> keystoreFiles = new LazyPropertyMap<>("Keystore files", this, FileEntry::new);
    private final LazyPropertyList<CliEntry> cliSetup = new LazyPropertyList<>("CLI setup commands", this);
    private final LazyPropertyMap<String, CharSequence> systemProperties = new LazyPropertyMap<>("System properties", this);
    private final LazyPropertyMap<String, CharSequence> environment = new LazyPropertyMap<>("Environment", this);
    private final LazyPropertyList<CharSequence> jvmArgs = new LazyPropertyList<>("JVM arguments", this);
    private final LazyPropertyMap<String, File> extraConfigFiles = new LazyPropertyMap<>("Extra config files", this, FileEntry::new);
    private final LazyPropertyList<FileCollection> extraJarConfigurations = new LazyPropertyList<>("Extra jar files", this);
    private final List<Map<String, String>> credentials = new ArrayList<>();
    private final List<File> roleFiles = new ArrayList<>();
    private final List<FeatureFlag> featureFlags = new ArrayList<>();
    final LinkedHashMap<String, String> defaultConfig = new LinkedHashMap<>();
    private final Path confPathRepo;
    private final Path configFile;
    private final Path confPathLogs;
    private final Path transportPortFile;
    private final Path httpPortsFile;
    private final Path readinessPortsFile;
    private final Path esOutputFile;
    private final Path esInputFile;