### Elasticsearch Version

8.x

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Any

### Problem Description

ILM [SwapAliasesAndDeleteSourceIndexStep](https://github.com/elastic/elasticsearch/blob/ffcf0eac010df3b5ba7989c5dd87bf362dd0d311/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/SwapAliasesAndDeleteSourceIndexStep.java) doesn't play nicely with with hidden aliases. 

When we copy the aliases from the source index in the move step, we do not copy the is_hidden value.

This can lead to permanently bad ILM state with an error like:

```
policy [kibana-event-log-policy] for index [.kibana-event-log-7.11.1-000044] failed on step [{"phase":"frozen","action":"searchable_snapshot","name":"swap-aliases"}]. Moving to ERROR step java.lang.IllegalStateException: alias [.kibana-event-log-7.11.1] has is_hidden set to true on indices [...]; alias must have the same is_hidden setting on all indices at org.elasticsearch.cluster.metadata.Metadata$Builder.validateAlias(Metadata.java:2089) 
```

### Steps to Reproduce

Combination of ILM and hidden aliases.

### Logs (if relevant)

_No response_
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/SwapAliasesAndDeleteSourceIndexStepTests.java
.numberOfShards(randomIntBetween(1, 5))
            .numberOfReplicas(randomIntBetween(0, 5));
        AliasMetadata.Builder aliasBuilder = AliasMetadata.builder(randomAlphaOfLengthBetween(3, 10));
        if (randomBoolean()) {
            aliasBuilder.routing(randomAlphaOfLengthBetween(1, 10));
        }
        if (randomBoolean()) {
            aliasBuilder.searchRouting(randomAlphaOfLengthBetween(1, 10));
        }
        if (randomBoolean()) {
            aliasBuilder.indexRouting(randomAlphaOfLengthBetween(1, 10));
        }
        aliasBuilder.writeIndex(randomBoolean());
        AliasMetadata aliasMetadata = aliasBuilder.build();
        IndexMetadata sourceIndexMetadata = sourceIndexMetadataBuilder.putAlias(aliasMetadata).build();
        String targetIndexPrefix = "index_prefix";
        String targetIndexName = targetIndexPrefix + sourceIndexName;
        List<AliasActions> expectedAliasActions = Arrays.asList(
            AliasActions.removeIndex().index(sourceIndexName),
            AliasActions.add().index(targetIndexName).alias(sourceIndexName),
            AliasActions.add()
                .index(targetIndexName)
                .alias(aliasMetadata.alias())
                .searchRouting(aliasMetadata.searchRouting())
                .indexRouting(aliasMetadata.indexRouting())
                .writeIndex(null)
        );
        try (NoOpClient client = getIndicesAliasAssertingClient(expectedAliasActions)) {
            SwapAliasesAndDeleteSourceIndexStep step = new SwapAliasesAndDeleteSourceIndexStep(
                randomStepKey(),