RestartPlayerAtPlayerStart() respawned player on it's location but not at a PlayerStart

This code (v4.26.0) from actor component always respawn player on it’s death in the current actor location, but not at the player start:


if (Owner)
{
    // Find all APlayerStart objects
    TArray<AActor*> FoundActors;
    UGameplayStatics::GetAllActorsOfClass(GetWorld(), APlayerStart::StaticClass(), FoundActors);

    auto PlayerController = Owner->GetController();
    auto PlayerStart = Cast<APlayerStart>(FoundActors[0]);

    // Shows correct locations for APlayerStart and current actor position
    UE_LOG(LogTemp, Warning, TEXT("Player start location %s"), *PlayerStart->GetActorLocation().ToString());
    UE_LOG(LogTemp, Warning, TEXT("Player location %s"), *Owner->GetActorLocation().ToString());

    GetWorld()->GetAuthGameMode()->RestartPlayerAtPlayerStart(PlayerController, PlayerStart);
}

Why RestartPlayerAtPlayerStart do not respawn player at PlayerStart? Seems that PlayerStart located where it is expected.
Maybe better to use Destroy/Spawn Character and Possess/Unpossess with the current PlayerController?

Any thoughts would be appreciated

This code works for me:


if (Owner)
{
    TArray<AActor*> FoundActors;
    UGameplayStatics::GetAllActorsOfClass(GetWorld(), APlayerStart::StaticClass(), FoundActors);
    auto PlayerStart = Cast<APlayerStart>(FoundActors[0]);

    auto PlayerController = Owner->GetController();
    PlayerController->UnPossess();

    auto PlayerClass = Owner->GetClass();

    auto NewCharacter = GetWorld()->SpawnActor<AActor>(PlayerClass, PlayerStart->GetActorLocation(), PlayerStart->GetActorRotation());

    if (NewCharacter)
    {
        auto CharacterToPossess = Cast<ACharacter>(NewCharacter);
        if (CharacterToPossess)
        {
            PlayerController->Possess(CharacterToPossess);
            Owner->Destroy();
        }
    }
}

But still interesting in the RestartPlayerAtPlayerStart() logic