### Elasticsearch Version

7.13.3

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

ubuntu

### Problem Description

When doing a shrink, a copy of each shard is first reallocated to the one node. Then a shrink is initiated, which generates new shards. In case the chosen node is above the low watermark now, the shrunk index cannot be allocated to the node. Currently, this can result in an unnecessary scale up when using autoscaling.

This relates to the work in #76206 in that fixing that one would reduce the risk of this occurring. We also have thoughts around retries in ILM to fix a stuck shrink. However, we would still need to ensure autoscaling would not scale up unnecessarily in this case (but still scale up if that is theonly  way to ensure the shrink succeeds).

### Steps to Reproduce

NA

### Logs (if relevant)

_No response_
x-pack/plugin/autoscaling/src/internalClusterTest/java/org/elasticsearch/xpack/autoscaling/storage/ProactiveStorageIT.java
assertThat(response.results().get(policyName).requiredCapacity().node().storage().getBytes(), Matchers.equalTo(maxShardSize));
    }
    private void putAutoscalingPolicy(String policyName, Settings settings) {
        final PutAutoscalingPolicyAction.Request request = new PutAutoscalingPolicyAction.Request(
            policyName,
            new TreeSet<>(Set.of("data")),
            new TreeMap<>(Map.of("proactive_storage", settings))
        );
        assertAcked(client().execute(PutAutoscalingPolicyAction.INSTANCE, request).actionGet());
    }
    private static void createDataStreamAndTemplate(String dataStreamName) throws IOException {
        client().execute(
            PutComposableIndexTemplateAction.INSTANCE,
            new PutComposableIndexTemplateAction.Request(dataStreamName + "_template").indexTemplate(
                new ComposableIndexTemplate(
                    Collections.singletonList(dataStreamName),
                    new Template(Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).build(), null, null),
                    null,
                    null,
                    null,
                    null,
                    new ComposableIndexTemplate.DataStreamTemplate(),
                    null
                )
            )
        ).actionGet();
        client().execute(CreateDataStreamAction.INSTANCE, new CreateDataStreamAction.Request(dataStreamName)).actionGet();
    }
}