Pick up weapons from the ground (problem c++)

Hello guys.
I’m trying to pick up weapons from the ground.
First, play animation and then snap the root component of weapon to character socket.
But if I snap the root component of weapon to socket, the weapon don’t receives the correct location.
If I snap only the weapon mesh, the weapon receives the correct location, but if I throw out the weapon and pick up again, weapon receives incorrect location.

This code causes the weapon to receive incorrect position

ACharacterMS* GetChar = Cast<ACharacterMS>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
	WeaponRootBox->AttachTo(GetChar->FPVMesh, "WeaponSocket");

and this code causes the weapon to receive the correct position,
but to throw it away and then take the gun back she does not receive the correct location of the socket

ACharacterMS* GetChar = Cast<ACharacterMS>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
	WeaponMesh->AttachTo(GetChar->FPVMesh, "WeaponSocket");


USceneComponent::AttachTo takes an EAttachType as an optional parameter, after the socket name.
When you are calling AttachTo on your root component, if you pass EAttachLocation::SnapToTarget as that extra argument, like so:

WeaponRootBox->AttachTo(GetChar->FPVMesh, "WeaponSocket", EAttachLocation::SnapToTarget);

I believe the weapon should teleport to the socket.