You should not forget to cache your player controller too
APlayerController* controller = GetController();
controller->UnPossess();
ACharacter* character = GetWorld()->SpawnActor...
controller->Possess(character);
otherwise GetController() from unpossessed pawn will return null