Rigidbody world space simulation overwrites scaling

I think the InstantiatePhysicsAssetRefPose function has a scaling issue. To resolve it, I set the physics in world space to UnitScale first and then modified it so that the body and constraint sizes can be adjusted externally.
I have modified two files, and the changes are attached below.
Please refer to the NX_ENGINE_START and NX_ENGINE_END comments for details.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AnimNode_RigidBody.cpp
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

switch(SimulationSpace)
{
case ESimulationSpace::ComponentSpace: ComponentSpaceTM = BodyTM; break;
case ESimulationSpace::WorldSpace: ComponentSpaceTM = BodyTM.GetRelativeTransform(SimulationWorldSpaceTM); break;
case ESimulationSpace::BaseBoneSpace: ComponentSpaceTM = BodyTM * BaseBoneTM; break;
default: ensureMsgf(false, TEXT(“Unsupported Simulation Space”)); ComponentSpaceTM = BodyTM;
}

//NX_ENGINE_START
if (SimulationSpace == ESimulationSpace::WorldSpace)
ComponentSpaceTM.SetScale3D(FVector::OneVector);
//NX_ENGINE_END

OutBoneTransforms.Add(FBoneTransform(OutputData.CompactPoseBoneIndex, ComponentSpaceTM));
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
constexpr bool bCreateBodiesInRefPose = true;
SkeletalMeshComp->InstantiatePhysicsAssetRefPose(
UsePhysicsAsset,
//NX_ENGINE_START
FVector(1.f),
//NX_ENGINE_END
HighLevelBodyInstances,
HighLevelConstraintInstances,
nullptr,
nullptr,
INDEX_NONE,
FPhysicsAggregateHandle(),
bCreateBodiesInRefPose);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
bool bSimulated = (BodySetup->PhysicsType == EPhysicsType::PhysType_Simulated);
ImmediatePhysics::EActorType ActorType = bSimulated ? ImmediatePhysics::EActorType::DynamicActor : ImmediatePhysics::EActorType::KinematicActor;
FTransform trans(BodyInstance->GetUnrealWorldTransform());
//NX_ENGINE_START
if(SimulationSpace == ESimulationSpace::WorldSpace)
trans.SetScale3D(trans.GetScale3D() * SkeletalMeshComp->GetComponentToWorld().GetScale3D());
//NX_ENGINE_END
ImmediatePhysics::FActorHandle
NewBodyHandle = PhysicsSimulation->CreateActor(ActorType, BodyInstance, trans);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FConstraintInstance* CI = HighLevelConstraintInstances[ConstraintIdx];
//NX_ENGINE_START
if(SimulationSpace == ESimulationSpace::WorldSpace)
CI->SetLastKnownScale(CI->GetLastKnownScale() * SkeletalMeshComp->GetComponentToWorld().GetScale3D().GetAbsMin());
//NX_ENGINE_END

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ConstraintInstance.h
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

//NX_ENGINE_START
void SetLastKnownScale(float InLastKnownScale) { LastKnownScale = InLastKnownScale;}
//NX_ENGINE_END