CXone Studio ASSIGN scope not persisting across nested IF branches

Trying to set a custom attribute in CXone Studio using ASSIGN inside a nested IF block, but the variable seems to reset once the branch closes. Here’s the snippet:

IF [Contact.custom.is_vip] == "true"
 ASSIGN [Contact.custom.priority] = "high"
ENDIF

The value shows up in the debug log immediately after assignment, but it’s empty when I try to read it later in the flow. Is there a specific scoping rule I’m missing for ASSIGN inside conditional blocks?