There's a windows AccessDeniedException buried in here somewhere but I'm not sure if that's the root cause or not.

**Build scan:**
https://gradle-enterprise.elastic.co/s/ua7fjthhwhydq/tests/:server:internalClusterTest/org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT/testDeleteIndexDuringSnapshot

**Reproduction line:**
`gradlew ':server:internalClusterTest' --tests "org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT.testDeleteIndexDuringSnapshot" -Dtests.seed=205E4FD38CD27088 -Dtests.locale=bg-BG -Dtests.timezone=Africa/Kinshasa -Druntime.java=18`

**Applicable branches:**
master

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

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT&tests.test=testDeleteIndexDuringSnapshot

**Failure excerpt:**
```
java.lang.Exception: Test abandoned because suite timeout was reached.

  at __randomizedtesting.SeedInfo.seed([205E4FD38CD27088]:0)

```
server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
final ShardStats shardStats = Arrays.stream(client().admin().indices().prepareStats(indexName).get().getShards())
            .filter(s -> s.getShardRouting().shardId().equals(shardId))
            .findFirst()
            .get();
        final RetentionLeases retentionLeases = shardStats.getRetentionLeaseStats().retentionLeases();
        assertTrue(shardStats + ": " + retentionLeases, retentionLeases.contains(leaseId));
        final String snapshotName = "snapshot-retention-leases";
        createSnapshot(repoName, snapshotName, Collections.singletonList(indexName));
        if (randomBoolean()) {
            final int extraDocCount = iterations(10, 1000);
            logger.debug("--> indexing {} extra docs into {}", extraDocCount, indexName);
            indexRequestBuilders = new IndexRequestBuilder[extraDocCount];
            for (int i = 0; i < extraDocCount; i++) {
                indexRequestBuilders[i] = client().prepareIndex(indexName).setSource("field", "value");
            }
            indexRandom(true, indexRequestBuilders);
        }
        
        ensureGreen();
        logger.debug("-->  close index {}", indexName);
        assertAcked(client().admin().indices().prepareClose(indexName));
        logger.debug("--> restore index {} from snapshot", indexName);
        RestoreSnapshotResponse restoreResponse = clusterAdmin().prepareRestoreSnapshot(repoName, snapshotName)
            .setWaitForCompletion(true)
            .get();
        assertThat(restoreResponse.getRestoreInfo().successfulShards(), equalTo(shardCount));
        assertThat(restoreResponse.getRestoreInfo().failedShards(), equalTo(0));
        ensureGreen();
        assertDocCount(indexName, snapshotDocCount);
        final RetentionLeases restoredRetentionLeases = Arrays.stream(client().admin().indices().prepareStats(indexName).get().getShards())