### 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/main/java/org/elasticsearch/xpack/core/ilm/SwapAliasesAndDeleteSourceIndexStep.java
@Override
    public void performAction(
        IndexMetadata indexMetadata,
        ClusterState currentClusterState,
        ClusterStateObserver observer,
        ActionListener<Void> listener
    ) {
        String originalIndex = indexMetadata.getIndex().getName();
        final String targetIndexName = targetIndexNameSupplier.apply(originalIndex, indexMetadata.getLifecycleExecutionState());
        IndexMetadata targetIndexMetadata = currentClusterState.metadata().index(targetIndexName);
        if (targetIndexMetadata == null) {
            String policyName = indexMetadata.getLifecyclePolicyName();
            String errorMessage = String.format(
                Locale.ROOT,
                "target index [%s] doesn't exist. stopping execution of lifecycle [%s] for" + " index [%s]",
                targetIndexName,
                policyName,
                originalIndex
            );
            logger.debug(errorMessage);
            listener.onFailure(new IllegalStateException(errorMessage));
            return;
        }
        deleteSourceIndexAndTransferAliases(getClient(), indexMetadata, targetIndexName, listener, createSourceIndexAlias);
    }
    /**
     * Executes an {@link IndicesAliasesRequest} to copy over all the aliases from the source to the target index, and remove the source
     * index.
     * <p>
     * The is_write_index will *not* be set on the target index as this operation is currently executed on read-only indices.