You’ll want to use a Blackboard decorator on the sequence node for your wander behavior. I assume you have some key in your blackboard that says whether or not it should be following your player, use that as the “Blackboard Key” in the decorator and make sure that “Observer aborts” is set to “Self.”
The value of “Key Query” is going to depend on how you’re determining whether to follow the player. For example, if you’re using a bool then you would make it “Is Not Set”, if you’re using an enum to determine behavior you’d make it “Is Equal To” and “Key Value” would be set to the value of your enum that says it should be wandering.