CI_BUILD_REF_NAME issue - loosing branch name

According to GitLab Documentation - Variables CI_BUILD_REF_NAME is for "The branch or tag name for which project is built"

Example values (on the same doc page) shows:

CI_BUILD_REF_NAME="master"
CI_BUILD_TAG="1.0.0"

However, as soon as I tag my repo on master I loose any way to recognize the branch (need this info for docker's tag) and see just tag in both fields:

$ export

declare -x CI_BUILD_REF_NAME="1.1.1"
declare -x CI_BUILD_TAG="1.1.1"
....

Is there any way to achieve what I need? I.e. to keep branch name in CI_BUILD_REF_NAME or some over way to get this info from CI build?