Lipschitz properties in variable exponent problems via relative rearrangement