Attached mesh - rotate animation not working correctly

I have a c++ program where I am trying to rotate a static mesh that is attached to another static mesh.
My Pawn class derives from Default Pawn. When it drops to the floor, it works correctly, and if I rotate the
attached static mesh, it works correctly, but if I rotate the parent static mesh, the attached mesh rotates
into the floor as if the collision was ignored. See the code and screenshots below. Could this be related to
this bug:

Is there a workaround, or should I use sockets or physical constraint or something else?

Any help/advice would be appreciated.

thank you

new project c++, basic code

delete chairs, etc. scale floor way up in x,y

change USE_FEMUR to switch between rotating attached vs parent mesh


void AMyProject2GameModeBase::BeginPlay()
    ATestPawn* testPawn = GetWorld()->SpawnActor<ATestPawn>(ATestPawn::StaticClass(), FVector(1600, 1600, 400), FRotator(0, 0, 0), FActorSpawnParameters());
    USphereComponent* testPawnCollision = testPawn->GetCollisionComponent();


#define USE_FEMUR true

int16 deltaDir = +10;
int16 minRotation = USE_FEMUR ? 90 : 30;
int16 maxRotation = USE_FEMUR ? 120 : 60;
UStaticMeshComponent* Leg1;
UStaticMeshComponent* Leg2;
UStaticMeshComponent* Leg3;
float LegRotation;

    PrimaryActorTick.bCanEverTick = true;

    const float Scale = GetCollisionComponent()->GetUnscaledSphereRadius() / 160.f;
    Leg1 = AddLeg(RootComponent, 0);
    Leg2 = AddLeg(RootComponent, 1);
    Leg3 = AddLeg(RootComponent, 2);
    LegRotation = minRotation;

UStaticMeshComponent* ATestPawn::AddLeg(USceneComponent* Sphere, int loop)
    float angle = loop * 120.0f;
    static ConstructorHelpers::FObjectFinder<UStaticMesh> MeshAsset(*FString("/Game/StarterContent/Shapes/Shape_Cylinder.Shape_Cylinder"));
    FName FemurName = *(FString("Femur_") + FString::FromInt(loop));
    UStaticMeshComponent* Femur = CreateDefaultSubobject<UStaticMeshComponent>(FemurName);
    Femur->SetRelativeRotation(FRotator(90.0f, angle, 0.0f));
    Femur->SetWorldScale3D(FVector(1, 1, 4));
    FName TibiaName = *(FString("Tibia_") + FString::FromInt(loop));
    UStaticMeshComponent* Tibia = CreateDefaultSubobject<UStaticMeshComponent>(TibiaName);
    Tibia->SetRelativeLocation(FVector(0.0f, 0.0f, 100.0f));
    Tibia->SetRelativeRotation(FRotator(30.0f, 0.0f, 0.0f));
    return USE_FEMUR ? Femur : Tibia;

void ATestPawn::Tick(float DeltaTime)
    LegRotation += deltaDir * DeltaTime;
    Leg1->SetRelativeRotation(FRotator(LegRotation, 0.0f, 0.0f));
    if (LegRotation <= minRotation) { deltaDir = +10; }
    if (LegRotation >= maxRotation) { deltaDir = -10; }

no rotation:

rotate attached mesh:

rotate parent mesh:

I think I found the answer,
in the Unreal documentation for UMovementComponent:

it says:

“During swept (non-teleporting) movement only collision of UpdatedComponent is considered, attached components will teleport to the end location ignoring collision.”

which is what is happening here, the code is manually doing the same thing as the URotatingMovementComponent,
and the collision of the rotated component is working correctly, the collision of the attached component seems to be ignored.