Unreal Engine AIController does not reset behavior upon possessing new pawn

I found a solution for this problem:

In my OnPossess override, I make sure to first reset the Behavior Tree using the RestartTree function with the EBTRestartMode::CompleteRestart parameter:

void MyAIController::OnPossess(APawn* InPawn)
{
	Super::OnPossess(InPawn);

	if(UBehaviorTreeComponent* BTComponent = Cast<UBehaviorTreeComponent>(BrainComponent))
	{
		BTComponent->RestartTree(EBTRestartMode::CompleteRestart);
	}

	RunBehaviorTree(BehaviorTree);
}

Hope this helps anyone struggling with this!