Ended up with the sub tree loaded on design time after exiting play mode.
Can't really say what happened and how to repro as its happening really rare and randomly (2 times in 4 days).

My graph looked like this:
If it helps, I am playing around with this logic to test some features:
public class EquipWeaponSubTree : MonoBehaviour
{
public BehaviorTree tree;
public Subtree ref1;
public Subtree ref2;
private Subtree instance1;
private Subtree instance2;
private void Start()
{
instance1 = Instantiate(ref1);
instance2 = Instantiate(ref2);
instance1.Deserialize();
instance2.Deserialize();
instance1.Pooled = true;
instance2.Pooled = true;
}
public void Equip1()
{
bool result = tree.SetVariableValue("EquippedWeapon", instance1, Opsive.GraphDesigner.Runtime.Variables.SharedVariable.SharingScope.GameObject);
Debug.LogWarning($"Equip1 set variable result: {result}");
tree.ReevaluateSubtreeReferences();
}
public void Equip2()
{
bool result = tree.SetVariableValue("EquippedWeapon", instance2, Opsive.GraphDesigner.Runtime.Variables.SharedVariable.SharingScope.GameObject);
Debug.LogWarning($"Equip2 set variable result: {result}");
tree.ReevaluateSubtreeReferences();
}
private void OnGUI()
{
GUILayout.Label("Equip Weapon Subtree Example");
if (GUILayout.Button("Equip Weapon 1"))
{
Equip1();
}
if (GUILayout.Button("Equip Weapon 2"))
{
Equip2();
}
}
}