I thought they overrode the original values defined in the pipeline.
Yes, the original variables values got overrode at the queue time.
According to the imgs you showed, the IsProductionRelease
is calculated as 'False' which is also generated in your powershell script, this means your queue time variable is working correctly, the only different part is in your third img it changes to 'true' for some reason.
I built a demo you can refer to:
The SourceBranch
is set to the master
branch:

Variable IsProductionRelease
:

In the first test, the variable value was not changed:
Variables:
IsProductionRelease:
Parsing expression: <startsWith(variables['Build.SourceBranch'],'refs/heads/release')>
Evaluating: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
Expanded: startsWith('refs/heads/master', 'refs/heads/release')
Result: 'False'
And the powershell returns 'False' value too:
Is Producetion Release = False
In the second test, change the IsProductionRelease
value to $[startsWith(variables['Build.SourceBranch'],'refs/heads/master')]
:

Calculated result:
Variables:
IsProductionRelease:
Parsing expression: <startsWith(variables['Build.SourceBranch'],'refs/heads/master')>
Evaluating: startsWith(variables['Build.SourceBranch'], 'refs/heads/master')
Expanded: startsWith('refs/heads/master', 'refs/heads/master')
Result: 'True'
And the powershell returns 'True'
Is Producetion Release = True
Please check your whole process again.