### CI Link

https://gradle-enterprise.elastic.co/s/u2lcxs24nfi2q/tests/:x-pack:qa:full-cluster-restart:v8.4.3%23bwcTest/org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT/testDeploymentSurvivesRestart%20%7Bcluster=UPGRADED%7D?expanded-stacktrace=WyIwIl0&page=eyJvdXRwdXQiOnsiMCI6MX19&top-execution=1

### Repro line

./gradlew ':x-pack:qa:full-cluster-restart:v8.4.3#bwcTest' -Dtests.class="org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT" -Dtests.method="testDeploymentSurvivesRestart {cluster=UPGRADED}" -Dtests.seed=498A9316A1FD5CFF -Dtests.bwc=true -Dtests.locale=cs-CZ -Dtests.timezone=Asia/Yangon -Druntime.java=17

### Does it reproduce?

No

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

{"error":{"root_cause":[{"type":"status_exception","reason":"Trained model [trained-model-full-cluster-restart] is not initialized"}],"type":"status_exception","reason":"Trained model [trained-model-full-cluster-restart] is not initialized","caused_by":{"type":"status_exception","reason":"Trained model [trained-model-full-cluster-restart] is not initialized"}},"status":409} 


at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:347) 
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:313)  
at org.elasticsearch.client.RestClient.performRequest(RestClient.java:288)  
at org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT.infer(MLModelDeploymentFullClusterRestartIT.java:220) at org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT.assertInfer(MLModelDeploymentFullClusterRestartIT.java:132) at org.elasticsearch.xpack.restart.MLModelDeploymentFullClusterRestartIT.testDeploymentSurvivesRestart(MLModelDeploymentFullClusterRestartIT.java:108)


x-pack/qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/xpack/restart/MLModelDeploymentFullClusterRestartIT.java
request.addParameter("wait_for_status", "yellow");
                request.addParameter("timeout", "70s");
            }));
            waitForDeploymentStarted(modelId);
            assertBusy(() -> {
                assertInfer(modelId);
                assertNewInfer(modelId);
            }, 90, TimeUnit.SECONDS);
            stopDeployment(modelId);
        }
    }
    @SuppressWarnings("unchecked")
    private void waitForDeploymentStarted(String modelId) throws Exception {
        assertBusy(() -> {
            var response = getTrainedModelStats(modelId);
            Map<String, Object> map = entityAsMap(response);
            List<Map<String, Object>> stats = (List<Map<String, Object>>) map.get("trained_model_stats");
            assertThat(stats, hasSize(1));
            var stat = stats.get(0);
            assertThat(
                stat.toString(),
                XContentMapValues.extractValue("deployment_stats.allocation_status.state", stat),
                equalTo("fully_allocated")
            );
            assertThat(stat.toString(), XContentMapValues.extractValue("deployment_stats.state", stat), equalTo("started"));
        }, 90, TimeUnit.SECONDS);
    }
    private void assertInfer(String modelId) throws IOException {
        Response inference = infer("my words", modelId);
        assertThat(EntityUtils.toString(inference.getEntity()), equalTo("{\"predicted_value\":[[1.0,1.0]]}"));