Deletion with upsert is not working

Same as before. Looks like I failed to explain it.

The “word dot word” (w. w) pattern does not exist by default in DQL. It is a feature of GraphQL modeling that we use there. Please do not confuse the two.

Based on analyzing your schema, the query should be something like this. Also, please remove the @normalize directive as it has no effect in this context.

{
        q(func: uid("0x9c49")) @recurse {
          all_ids as uid
          branches
          child_groups
        }
      }

The best and safe should be like

 upsert {
      query {
        q(func: uid("0x9c49")) @recurse  {
          uid
          b as branches
          c as child_groups
        }
      }

      mutation {
        delete {
          uid(b) * * .
          uid(c) * * .
        }
      }
    }