I have figured out that variables in my variable group that come from key vault are not visible in my env variables when running the bash script.
Further, if I create a variable group that is not linked to key vault i.e. a variable group with key: value, yolo1: yolo1, those variables are visible in my env variables when running the bash script.
To summarise this update, variables in a variable group that come from key vault don't work as expected.
"However, secret variables (encrypted variables and key vault variables) cannot be accessed directly in scripts - instead they must be passed as arguments to a task". Quoted from here: https://learn.microsoft.com/en-us/vsts/pipelines/library/variable-groups?view=vsts
So we had to figure out how to pass arguments to our task. Here I am passing my secret yolo3 as an argument to my bash script task

Then I can reference the secret yolo3 as an argument in my bash script i.e. $1.
Hopefully, this will help someone else :).