Checkout jenkins pipeline code from git tag

My jenkinsfiles for the pipelines are stored next to the code in the main repository. I would like to deploy to commit tags, but jenkins fails to checkout the repo to read the pipeline code during the “Declarative checkhout” initial step.

I use a parameter named Branch in the pipeline to specify which branch/tag I need.
I use ${Branch} in the pipeline configuration, it handles branches correctly, but not tags.

I receive this:
hudson.plugins.git.GitException: Command “git fetch --tags --force --progress --prune – origin +refs/heads/3.12.0-hotfix1:refs/remotes/origin/3.12.0-hotfix1” returned status code 128:
stderr: fatal: couldn’t find remote ref refs/heads/3.12.0-hotfix1
fatal: the remote end hung up unexpectedly

git show-ref --tags returns the tags correctly
ad556d37f45351f424d7cb065fc1a94282a40390 refs/tags/3.12.0-hotfix1

any clue? thanks!

answering my own question: disabling lightweight checkout solves the issue.
from the Help bubble:
" Also build parameters will not be substituted into SCM configuration in this mode. "