Sharp constants for composition with a bi-Lipschitz measure-preserving map