Value is different for the same variable on Catalog Task and RITM variable editors.
Any supported release
Having same Label for two different variables.
When a Request is submitted for a Catalog Item, all the variables are displayed on the RITM variable editor.(Unless hidden by a Client Script or UI Policies)
But the catalog Task variable editor will only display the variables included in the "Catalog Task" workflow activity.
or the variables must be Global.
If you have two variables (ex: Reference and Single Line text) with the same Label and only one (Single Line Text) variable was added to the Catalog Task workflow activity.
The RITM variable editor display both the variables but the Catalog Task has only one (Single Line Text).
You might be checking the variable (Reference) value against the variable (Single Line Text) which was not included on the Catalog Task.
So, make sure the Label is unique for the variables on the same catalog Item or add the correct variable to the Catalog Task activity based on the 'name'.