I almost got brain aneurysm thinking that the query syntax of tree-sitter and ast-grep differ.
Fortunately that's not the case, but - contrary to Internet wisdom - query syntax is not compatible between languages (parsers).
Also, ast-grep's Playground is insanely useful:
https://ast-grep.github.io/playground.html