### Elasticsearch Version

7.17, 8.x

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Darwin

### Problem Description

The migrate to data tiers routing API changes the allocation configuration for 
the indices that need migrating to data tiers routing. 
After such changes we should do a cluster re-route so the allocation changes
take effect immediately. 

### Steps to Reproduce

1. On a one node `data_hot,data_content,master` node create the following index
```
PUT datatiers_problem_index
{
    "settings": {
        "index.routing.allocation.include._tier_preference": "data_hot",
        "index.routing.allocation.require.data": "hot"
    }
}
```
2. Migrate to data tiers and observe the shard is not allocated afterwards
`POST _ilm/migrate_to_data_tiers`

### Logs (if relevant)

_No response_
x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java
Map<String, Object> coldAllocateActionMap = (Map<String, Object>) coldActionsMap.get(AllocateAction.NAME);
        assertThat((Map<String, Object>) coldAllocateActionMap.get("include"), is(anEmptyMap()));
        assertThat((Map<String, Object>) coldAllocateActionMap.get("require"), is(anEmptyMap()));
        assertThat((Map<String, Object>) coldAllocateActionMap.get("exclude"), is(anEmptyMap()));
        Request getClusterMetadataRequest = new Request("GET", "/_cluster/state/metadata/" + index);
        Response clusterMetadataResponse = client().performRequest(getClusterMetadataRequest);
        String cachedPhaseDefinition = getCachedPhaseDefAsMap(clusterMetadataResponse, index);
        
        
        assertThat(
            "the cached phase definition should reflect the migrated warm phase which must NOT contain an allocate action anymore",
            cachedPhaseDefinition,
            not(containsString(AllocateAction.NAME))
        );
        assertThat(cachedPhaseDefinition, containsString(ShrinkAction.NAME));
        assertThat(cachedPhaseDefinition, containsString(SetPriorityAction.NAME));
        assertThat(cachedPhaseDefinition, containsString(ForceMergeAction.NAME));
        
        Request getSettingsRequest = new Request("GET", "_cluster/settings?include_defaults");
        Response getSettingsResponse = client().performRequest(getSettingsRequest);
        JsonMapView json = XContentTestUtils.createJsonMapView(getSettingsResponse.getEntity().getContent());
        assertThat(json.get("persistent.cluster.routing.allocation.enforce_default_tier_preference"), nullValue());
        assertTrue(Booleans.parseBoolean(json.get("defaults.cluster.routing.allocation.enforce_default_tier_preference")));
    }
    @SuppressWarnings("unchecked")
    public void testIndexTemplatesMigration() throws Exception {
        
        String legacyTemplateToMigrate = "legacy_to_migrate";
        {
            Request legacyTemplateToMigrateReq = new Request("PUT", "/_template/" + legacyTemplateToMigrate);