### Elasticsearch Version

8.10, 8.11, 8.12

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Darwin

### Problem Description

When an ILM policy is created we don't allow the same donwsample action (same interval) to be configured in subsequent phases. 

This can be achieved though by updating the ILM policy by removing it from the hot phase and configuring it with the same `fixed_interval` in the warm phase. 

This can cause some in-flight indices that were downsampled in hot to now be downsampled in warm for the same interval. 
ILM will go through the warm/downsample action, skip the downsample operation (as the source index is donwsampled already) and delete the source index. This leads to data loss. 

The exact use case is “update the next phase to contain the downsample action from the previous phase, whilst the managed index is waiting to enter the next phase”.

### Steps to Reproduce

```
PUT _ilm/policy/ds-experiment-policy
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "5m",
            "max_primary_shard_size": "10gb"
          },
          "downsample": {
            "fixed_interval": "1m"
          }
        }
      },
      "warm": {
        "min_age": "10m",
        "actions": {
        }
      }
    }
  }
}

POST my-ds-experiment/_rollover


PUT _component_template/ds-experiment-component
{
  "template": {
    "settings": {
      "index": {
        "lifecycle": {
          "name": "ds-experiment-policy"
        },
        "look_ahead_time": "4m",
        "codec": "best_compression"
      }
    },
    "mappings": {
      "runtime": {},
      "properties": {
        "@timestamp": {
          "format": "strict_date_optional_time_nanos",
          "type": "date_nanos"
        },
        "networkName": {
          "time_series_dimension": true,
          "type": "keyword"
        }
      }
    }
  }
}

PUT _index_template/my-ds-experiment-template
{
  "index_patterns": [
    "my-ds-experiment*"
  ],
  "template": {
    "settings": {
      "index": {
        "mode": "time_series",
        "routing_path": [
          "networkName"
        ]
      }
    }
  },
  "composed_of": [
    "ds-experiment-component"
  ],
  "data_stream": {
    "allow_custom_routing": false,
    "hidden": false
  }
}

PUT _data_stream/my-ds-experiment

PUT my-ds-experiment/_bulk
{ "create":{ } }
{ "@timestamp": "<replace with current timestamp>", "networkName":  "test1"}

// update policy while index has been already created
PUT _ilm/policy/ds-experiment-policy
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "5m",
            "max_primary_shard_size": "10gb"
          }
        }
      },
      "warm": {
        "min_age": "10m",
        "actions": {
          "downsample": {
            "fixed_interval": "1m"
          }
        }
      }
    }
  }
}

// when index is moved to warm and downsampling happens, it will be deleted
```

### Logs (if relevant)

_No response_
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/DownsampleActionTests.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */
package org.elasticsearch.xpack.core.ilm;
import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
import org.elasticsearch.test.EqualsHashCodeTestUtils;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xpack.core.ilm.Step.StepKey;
import org.elasticsearch.xpack.core.rollup.ConfigTestHelpers;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static org.elasticsearch.xpack.core.ilm.DownsampleAction.CONDITIONAL_DATASTREAM_CHECK_KEY;
import static org.elasticsearch.xpack.core.ilm.DownsampleAction.CONDITIONAL_TIME_SERIES_CHECK_KEY;
import static org.hamcrest.Matchers.equalTo;
public class DownsampleActionTests extends AbstractActionTestCase<DownsampleAction> {
    public static final TimeValue WAIT_TIMEOUT = new TimeValue(1, TimeUnit.MINUTES);
    static DownsampleAction randomInstance() {
        return new DownsampleAction(ConfigTestHelpers.randomInterval(), WAIT_TIMEOUT);
    }
    @Override
    protected DownsampleAction doParseInstance(XContentParser parser) {
        return DownsampleAction.parse(parser);
    }