This is a limitation of the UI for building the parameter for the Query service, not a runtime limitation.
Put your query string in a Flow Map step that is before your Invoke of QueryDocument/queryXMLNode call. You can then explicitly turn on variable substitution in the Flow Map Set dialog. Then map the query string into the “fields” parameter to the query service. It may be a bit tricky to figure out exactly where that query string goes and how to get it there. Check in the Built In Services documentation for a description of the parameters.