CXone Studio IF action failing on string comparison despite correct syntax

The docs state: “The IF action evaluates a condition and routes the script based on the result.” I’ve set up a simple branch.

ASSIGN: temp_var = "true"
IF: temp_var == "true"
 Route A
ELSE
 Route B

It’s always hitting Route B. The variable is definitely a string. I’ve tried checking for null, trimming whitespace, even hardcoding the value in the IF statement. Nothing works. The script logs show the assignment succeeded. Why is the comparison failing?