This doesn’t help you now, but if tag:child would match #parent/child then you could do tag:parent -tag:child. Might be worth a feature request.
Or a request for a feature to search for a parent tag without its children, so you don’t have to remember and exclude every child. I thought there was an existing request for that but I don’t see it.