You are not actually changing the root component location, but just a local copy of it:
FVector BoxLocation(BoxComponent->GetComponentLocation());
This statement declares a local FVector variable with the same coordinates of the BoxComponent (copy constructor). When you add 20.f to the X you are adding it to the local variable, not to the box location.