QUERY is not supposed to work that way.
You should use query to get item IDs, and then use those ids to execute delete.
Ah, so there is no way to atomically delete a collection of matching items? And why it returns an empty array [ ] if the query isn't allowed?