This relates to #86790, which added logic that generates the `index.routing_path` index setting from from field mapped as keyword and marked as time series dimension in the mapping.

This builds on top of this and should also check dynamic templates if field template definition are of type `keyword` and `time_series_dimension` attribute is enabled. The `path_match` should then be added to the `index.routing_path` index setting.

This request originated from: https://github.com/elastic/kibana/issues/141796#issuecomment-1260619212
modules/data-streams/src/javaRestTest/java/org/elasticsearch/datastreams/TsdbDataStreamRestIT.java
var e = expectThrows(ResponseException.class, () -> client().performRequest(indexRequest));
        assertThat(e.getMessage(), containsString("is outside of ranges of currently writable indices"));
    }
    public void testChangeTemplateIndexMode() throws Exception {
        
        {
            var putComposableIndexTemplateRequest = new Request("POST", "/_index_template/1");
            putComposableIndexTemplateRequest.setJsonEntity(TEMPLATE);
            assertOK(client().performRequest(putComposableIndexTemplateRequest));
        }
        {
            var indexRequest = new Request("POST", "/k8s/_doc");
            var time = Instant.now();
            indexRequest.setJsonEntity(DOC.replace("$time", formatInstant(time)));
            var response = client().performRequest(indexRequest);
            assertOK(response);
        }
        {
            var putComposableIndexTemplateRequest = new Request("POST", "/_index_template/1");
            putComposableIndexTemplateRequest.setJsonEntity(NON_TSDB_TEMPLATE);
            var e = expectThrows(ResponseException.class, () -> client().performRequest(putComposableIndexTemplateRequest));
            assertThat(
                e.getMessage(),
                containsString(
                    "composable template [1] with index patterns [k8s*], priority [null],"
                        + " index.routing_path [] would cause tsdb data streams [k8s] to no longer match a data stream template"
                        + " with a time_series index_mode"
                )
            );
        }