No idea. We aren’t familiar with Semantic-Release specifically, but it seems like their check is not correct? I’d start by asking the authors of the code how they do that check, (or checking its code). We do the build entirely in your git repo as you can see from running commands like git branch --list during build.
Thank you for your reply i will try to investigate this further. I have used semantic release in other build environments like travis-ci and github actions and this is a first that i see such an error.