I’ve now got something to work in a different way. I get the original name of the input page:
[?page :block/name ?query-page]
[?page :block/original-name ?page-name]
and then use clojure.string/includes? to match to the properties-text-values:
[?p :block/properties-text-values ?prop]
[(get ?prop :parent) ?parent]
[(clojure.string/includes? ?parent ?page-name)]
A bit messy, but it works.