The file responsible for getting the git revision info cmake\modules\GetGitRevisionDescription.cmake reads the .git ref files directly, which is flaky and doesn't always work. I had to spend some effort to make it sort of work with git-worktree. It doesn't work when checking out a specific commit/tag. It cannot obtain the "dirty" status of the working tree.
git-describe should pretty much always work.