Towards Robust Trajectory Representations: Isolating Environmental Confounders with Causal Learning