Some more earlier failures with the same issue (all in Windows builds):
https://gradle-enterprise.elastic.co/s/ic3vf76vlpiho
https://gradle-enterprise.elastic.co/s/7nsuvadgg5bbm
https://gradle-enterprise.elastic.co/s/7kcrezoswrgdg

**Build scan:**
https://gradle-enterprise.elastic.co/s/whgmtqrtovpgu/tests/:server:internalClusterTest/org.elasticsearch.reservedstate.service.FileSettingsServiceIT/testErrorSaved

**Reproduction line:**
`gradlew ':server:internalClusterTest' --tests "org.elasticsearch.reservedstate.service.FileSettingsServiceIT.testErrorSaved" -Dtests.seed=762F971779043BEB -Dtests.locale=es-BO -Dtests.timezone=Africa/Luanda -Druntime.java=18`

**Applicable branches:**
main

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

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.reservedstate.service.FileSettingsServiceIT&tests.test=testErrorSaved

**Failure excerpt:**
```
org.elasticsearch.cluster.metadata.ProcessClusterEventTimeoutException: failed to process cluster event (delete_repository [*]) within 30s

  at __randomizedtesting.SeedInfo.seed([762F971779043BEB:C5DE1806AEE40E21]:0)
  at org.elasticsearch.cluster.service.MasterService$Batcher.lambda$onTimeout$1(MasterService.java:165)
  at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:825)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  at java.lang.Thread.run(Thread.java:833)

```
server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java
this.active = false;
        logger.debug("Stopping file settings service");
        stopWatcher();
    }
    @Override
    protected void doClose() {}
    private boolean currentNodeMaster(ClusterState clusterState) {
        return clusterState.nodes().getLocalNodeId().equals(clusterState.nodes().getMasterNodeId());
    }
    @Override
    public void clusterChanged(ClusterChangedEvent event) {
        ClusterState clusterState = event.state();
        startIfMaster(clusterState);
    }
    private void startIfMaster(ClusterState clusterState) {
        if (currentNodeMaster(clusterState)) {
            startWatcher(clusterState, initialState);
        } else {
            stopWatcher();
        }
        initialState = false;
    }
    /**
     * Used by snapshot restore service {@link org.elasticsearch.snapshots.RestoreService} to prepare the reserved
     * state of the snapshot for the current cluster.
     * <p>
     * If the current cluster where we are restoring the snapshot into has any operator file based settings, we'll
     * reset the reserved state version to 0.
     * <p>
     * If there's no file based settings file in this cluster, we'll remove all state reservations for