### Elasticsearch Version

8.7.0

### Problem Description

If a search template changes the default mustache delimiter using `{{=`, rendering the template will fail with a `MustacheException`, `Disallowed: changing defaul delimiters`.



### Steps to Reproduce

```
PUT _scripts/test_search_template
{
  "script": {
    "lang": "mustache",
    "source": """
    {
      "query": {
        "match": {
          "content": "{{query_string}}"
        }
      },
      "highlight": {
        {{=<% %>=}}
        "pre_tags": [
          "{{{{"
        ],
        "post_tags": [
          "}}}}"
        ],
        <%={{ }}=%>
        "fields": {
          "content": {},
          "title": {}
        }
      }
    }
    """
  }
}
```

```
POST _render/template
{
  "id": "test_search_template",
  "params": {
    "query_string": "test"
  }
}
```

Result:
```
{
  "error": {
    "root_cause": [
      {
        "type": "script_exception",
        "reason": "Disallowed: changing defaul delimiters",
        "script_stack": [],
        "script": """
    {
      "query": {
        "match": {
          "content": "{{query_string}}"
        }
      },
      "highlight": {
        {{=<% %>=}}
        "pre_tags": [
          "{{{{"
        ],
        "post_tags": [
          "}}}}"
        ],
        <%={{ }}=%>
        "fields": {
          "content": {},
          "title": {}
        }
      }
    }
    """,
        "lang": "mustache"
      }
    ],
    "type": "script_exception",
    "reason": "Disallowed: changing defaul delimiters",
    "script_stack": [],
    "script": """
    {
      "query": {
        "match": {
          "content": "{{query_string}}"
        }
      },
      "highlight": {
        {{=<% %>=}}
        "pre_tags": [
          "{{{{"
        ],
        "post_tags": [
          "}}}}"
        ],
        <%={{ }}=%>
        "fields": {
          "content": {},
          "title": {}
        }
      }
    }
    """,
    "lang": "mustache",
    "caused_by": {
      "type": "mustache_exception",
      "reason": "Disallowed: changing defaul delimiters"
    }
  },
  "status": 400
}
```

This was changed when switching to `SafeMustacheFactory` in https://github.com/elastic/elasticsearch/pull/92211 which sets [`allowChangingDelimeters`](https://github.com/spullara/mustache.java/blob/c17bb110161848e444576e93170a2a696770e9d3/compiler/src/main/java/com/github/mustachejava/SafeMustacheFactory.java#L82) to `false`.
modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/CustomMustacheFactory.java
);
    private final Encoder encoder;
    public CustomMustacheFactory(String mediaType) {
        super(Collections.emptySet(), ".");
        setObjectHandler(new CustomReflectionObjectHandler());
        this.encoder = createEncoder(mediaType);
    }
    public CustomMustacheFactory() {
        this(DEFAULT_MEDIA_TYPE);
    }
    @Override
    public void encode(String value, Writer writer) {
        try {
            encoder.encode(value, writer);
        } catch (IOException e) {
            throw new MustacheException("Unable to encode value", e);
        }
    }
    static Encoder createEncoder(String mediaType) {
        final Supplier<Encoder> supplier = ENCODERS.get(mediaType);
        if (supplier == null) {
            throw new IllegalArgumentException("No encoder found for media type [" + mediaType + "]");
        }
        return supplier.get();
    }
    @Override
    public MustacheVisitor createMustacheVisitor() {
        return new CustomMustacheVisitor(this);
    }
    class CustomMustacheVisitor extends DefaultMustacheVisitor {