Unfortunately, no, only one of those can be true. The ref is either the tag _or_ the branch.
Git does not maintain a history that corresponds tags and branches. Although a tag and a branch could be pointing to the same commit, there’s no notion that a tag was “created from” that branch. That these are the same could be coincidental, and there could be multiple tags and branches all pointing to the same commit, which you could not reason about.
If you have a naming pattern that will allow you to deduce this (and from your example, it seems like you may) then this may help with the matching. If you create tags named
refs/tags/staging-release-* from your
staging branch, then you can indeed say:
if: startsWith(github.ref, 'refs/tags/staging-release-')