Behavoir tree task variable changing from default

Hi, so I have a task with an enum variable which is public and set in the behavior tree. I have this task get call in in different place with different values for this variable. But when I run it the variable is sometimes set to the wrong value which corresponds to the node. It is also seemingly not random.
BT


Task

Function where variable is used

Variable