I assume your issue comes from the fact that you’re using an ECollisionChannel value in an array expecting an EObjectTypeQuery, using Emplace only forced the bytes to be copied from one enum to the other but that doesn’t necessarily map the values as the engine would expect.
You should use the following function to convert from one to the other:
UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_GameTraceChannel1)
Which should turn your code to this instead:
TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypesArray;
ObjectTypesArray.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_GameTraceChannel1));
bool bHasHit = UKismetSystemLibrary::SphereTraceSingleForObjects(GetWorld(), StartLocation, EndLocation, 500.f, ObjectTypesArray, false, IgnoredActors, EDrawDebugTrace::ForDuration, OutHit, true);