Docker run's ENV modifies path that I'm trying to set for variable

I’m trying to set environment variable like this:
–env “VAR=/opt/foo/bar”
But somehow inside container the variable becomes unusable, it’s equals to - C:/Users/Me/AppData/Local/Programs/Git/opt/foo/bar , i.e. for some reason Docker Desktop adds Windows’s current path to the VAR. How to tell it to stop doing so?

I moved the topic from Community category to Docker Desktop for Windows. Please, always read the pinned topic in the categories or the short description under the category name before posting.

Can you share an exact command that we can try?
And why is the “current path” points to the Git folder in AppData? Are you running the command from a special terminal? For example Git Bash?

I’m running it from git bash as .sh script. So maybe git’s bash doing such substitution.
Exact command inside .sh is:

docker run \
    --detach \
    --rm \
    --restart=no \
    --log-driver=local \
    --log-opt mode=non-blocking \
    --network="apache-airflow:2.2.4-python3.8"-net \
    --publish 8080:8080 \
    --cpus="2" \
    --memory-reservation=3g \
    --memory=4g \
    --memory-swap=5g \
    --mount type=bind,source="${airflow_dags_dir}",target=/opt/airflow/dags,readonly  \
    --privileged=false  \
    --health-cmd='python --version || exit 1' \
    --health-interval=2s \
    --env LANG=C.UTF-8 \
    --env "_AIRFLOW_DB_UPGRADE=true" \
    --env "_AIRFLOW_WWW_USER_CREATE=true" \
    --env "_AIRFLOW_WWW_USER_PASSWORD=admin" \
	--env-file=.env \
    --name "apache-airflow:2.2.4-python3.8"  \

The workaround is to use --env-file instead of --env.