### Elasticsearch Version

main @ aa862640e5af74815a0d1d9b9ae3734426ffb459

### Installed Plugins

_No response_

### Java Version

openjdk version "17.0.8" 2023-07-18

### OS Version

Ubuntu 23.04

### Problem Description

May be related to https://github.com/elastic/elasticsearch/issues/101017.

`LIKE` seems not to handle backslashes correctly. Given a field containing Windows-style paths, like `C:\a\b\c`, the following query should succeed:
```
from the_index | where the_field like "C:\\*"
```
but if sent via Kibana, returns an empty result.

### Steps to Reproduce

Via cURL:

Start a local instance of Elasticsearch and create an index with a Windows-style path:
```bash
$ curl -v -u elastic:password 'localhost:9200/my-idx/_doc' -H "Content-Type: application/json" -d '{"a": "C:\\b\\c.exe"}'
```

Now, with a single backslash, the query does not parse:
```bash
$ curl -v -u elastic:password 'localhost:9200/_query' -H "Content-Type: application/json" -d '{"query": "from `my-idx` | where a like \"C:\\*\""}'

{"error":{"root_cause":[{"type":"parsing_exception","reason":"line 1:30: token recognition error at: '\"C:\\*'"}],"type":"parsing_exception","reason":"line 1:30: token recognition error at: '\"C:\\*'","caused_by":{"type":"lexer_no_viable_alt_exception","reason":null}},"status":400}
```

With two backslashes, we obtain an empty result:
```
curl -v -u elastic:password 'localhost:9200/_query' -H "Content-Type: application/json" -d '{"query": "from `my-idx` | where a like \"C:\\\\*\""}' 

{"columns":[{"name":"a","type":"text"},{"name":"a.keyword","type":"keyword"}],"values":[]}%
```
In both cases, no warnings emitted (except the standard "No limit defined...")

### Logs (if relevant)

_No response_
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/predicate/regex/RegexMatch.java
public ScriptTemplate asScript() {
        ScriptTemplate fieldAsScript = asScript(field());
        
        if (caseInsensitive == false) {
            return new ScriptTemplate(
                formatTemplate(format("{ql}.", "regex({},{})", fieldAsScript.template())),
                paramsBuilder().script(fieldAsScript.params()).variable(pattern.asJavaRegex()).build(),
                dataType()
            );
        }
        return new ScriptTemplate(
            formatTemplate(format("{ql}.", "regex({},{},{})", fieldAsScript.template())),
            paramsBuilder().script(fieldAsScript.params()).variable(pattern.asJavaRegex()).variable(caseInsensitive).build(),
            dataType()
        );
    }
    @Override
    public boolean equals(Object obj) {
        if (super.equals(obj)) {
            RegexMatch<?> other = (RegexMatch<?>) obj;
            return caseInsensitive == other.caseInsensitive && Objects.equals(pattern, other.pattern);
        }
        return false;
    }
    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), pattern(), caseInsensitive);
    }
}