Possess and UnPossess not working

you are trying to possess Device but you need to possess the newly spawned actor

  if (Drone)
         {
             UWorld* world = GetWorld();
             if (world)
             {
     
                 FActorSpawnParameters spawnParams;
                 spawnParams.Owner = this;
     
                 FVector SpawnLocation = DeviceSpawnPoint->GetComponentLocation();
                 FRotator SpawnRotation = DeviceSpawnPoint->GetComponentRotation();
                 ACharacter* NewActor = world->SpawnActor<ACharacter>(Device, SpawnLocation, SpawnRotation, spawnParams);
     
                 AController* SavedController = GetController();
                 SavedController->UnPossess();
                 SavedController->Possess(NewActor);
             }
         }