C++ function and blueprint function look different

Don’t use const for function parameter as it prevent modification of the Actors array within the function, instead add UPARAM(ref)

UFUNCTION(BlueprintCallable)
void SortActorsByDistance(UPARAM(ref) TArray<AActor*>& Actors);