Tags missing in refs query with query field

When I query for most recent tags:

{
  repository(owner: "---", name: "---") {
    refs(refPrefix: "refs/tags/", last: 3, orderBy: {direction: ASC, field: TAG_COMMIT_DATE}) {
      edges {
        node {
          name
        }
      }
    }
  }
}

The API returns:

{
  "data": {
    "repository": {
      "refs": {
        "edges": [
          {
            "node": {
              "name": "staging-v100"
            }
          },
          {
            "node": {
              "name": "staging-v101"
            }
          },
          {
            "node": {
              "name": "staging-v102"
            }
          }
        ]
      }
    }
  }
}

But if I add a query:

{
  repository(owner: "---", name: "---") {
    refs(refPrefix: "refs/tags/", query: "staging", last: 3, orderBy: {direction: ASC, field: TAG_COMMIT_DATE}) {
      edges {
        node {
          name
        }
      }
    }
  }
}

The order gets messed up (missing v101, v102):

{
  "data": {
    "repository": {
      "refs": {
        "edges": [
          {
            "node": {
              "name": "staging-v98"
            }
          },
          {
            "node": {
              "name": "staging-v99"
            }
          },
          {
            "node": {
              "name": "staging-v100"
            }
          }
        ]
      }
    }
  }
}

Am I missing something here?

Got a response from GitHub Support:

Hi there Adam,

Thanks for writing in to report this. It looks like this is indeed an issue with orderBy being disregarded in some circumstances. I’ve passed this on to our engineering team so they can take a closer look!

I don’t have an ETA on when this will be addressed but I’ll make sure this is in good hands. Please don’t hesitate to ask if you have any other questions.

Best regards,
Steve