Why do my worlds not compare when using GetWorld?

Hi,

I am writing some automation tests, which are to be run with multiple clients open.

I am looking at finding the player from a world, and a specific tree actor from the same world. If I don’t attempt to filter out the world then I recieve multiple trees, one from each world, whilst iterating. Code:

for (TObjectIterator<AActor> it; it; ++it)
	{
		AActor* Tree = *it;

		if (Tree->FindComponentByClass<UInteractableComponent>() && !Tree->HasAuthority() && Tree->GetActorLabel() == "BP_Tree_Basic" && Tree->GetWorld() == Player->GetWorld())
		{

That if statement never enters. If I take the last condition off the end, comparing the world the tree is in to the world my player (found previously) is in, then it enters the if statement once for each client I have running.

How do I ensure I have the correct tree?