### 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/main/java/org/elasticsearch/xpack/core/ilm/DownsampleAction.java
@Override
    public boolean isSafeAction() {
        return false;
    }
    @Override
    public List<Step> toSteps(Client client, String phase, StepKey nextStepKey) {
        StepKey timeSeriesIndexCheckBranchKey = new StepKey(phase, NAME, CONDITIONAL_TIME_SERIES_CHECK_KEY);
        StepKey checkNotWriteIndex = new StepKey(phase, NAME, CheckNotDataStreamWriteIndexStep.NAME);
        StepKey waitForNoFollowerStepKey = new StepKey(phase, NAME, WaitForNoFollowersStep.NAME);
        StepKey waitTimeSeriesEndTimePassesKey = new StepKey(phase, NAME, WaitUntilTimeSeriesEndTimePassesStep.NAME);
        StepKey readOnlyKey = new StepKey(phase, NAME, ReadOnlyStep.NAME);
        StepKey cleanupDownsampleIndexKey = new StepKey(phase, NAME, CleanupTargetIndexStep.NAME);
        StepKey generateDownsampleIndexNameKey = new StepKey(phase, NAME, DownsamplePrepareLifeCycleStateStep.NAME);
        StepKey downsampleKey = new StepKey(phase, NAME, DownsampleStep.NAME);
        StepKey waitForDownsampleIndexKey = new StepKey(phase, NAME, WaitForIndexColorStep.NAME);
        StepKey copyMetadataKey = new StepKey(phase, NAME, CopyExecutionStateStep.NAME);
        StepKey copyIndexLifecycleKey = new StepKey(phase, NAME, CopySettingsStep.NAME);
        StepKey dataStreamCheckBranchingKey = new StepKey(phase, NAME, CONDITIONAL_DATASTREAM_CHECK_KEY);
        StepKey replaceDataStreamIndexKey = new StepKey(phase, NAME, ReplaceDataStreamBackingIndexStep.NAME);
        StepKey deleteIndexKey = new StepKey(phase, NAME, DeleteStep.NAME);
        StepKey swapAliasesKey = new StepKey(phase, NAME, SwapAliasesAndDeleteSourceIndexStep.NAME);
        
        BranchingStep isTimeSeriesIndexBranchingStep = new BranchingStep(
            timeSeriesIndexCheckBranchKey,
            nextStepKey,
            checkNotWriteIndex,
            (index, clusterState) -> {
                IndexMetadata indexMetadata = clusterState.metadata().index(index);
                assert indexMetadata != null : "invalid cluster metadata. index [" + index.getName() + "] metadata not found";
                return IndexSettings.MODE.get(indexMetadata.getSettings()) == IndexMode.TIME_SERIES;