"I am defining a variable in a sub-orchestrator and try to pass it between different durable functions."
Are you referring to activity functions when you mention "different durable functions" ?
Please let me know. Also you will have to avoid using static variables in durable functions
Avoid using static variables in orchestrator functions because their values can change over time, resulting in nondeterministic runtime behavior. Instead, use constants, or limit the use of static variables to activity functions.