Under drift forces, a monostable pattern propagates. However, examples of nonpropagative dynamics have been observed. We show that the origin of this pinning effect comes from the coupling between the slow scale of the envelope to the fast scale of the modulation of the underlying pattern. We evidence that this effect stems from spatial inhomogeneities in the system. Experiments and numerics on drifting pattern-forming systems subjected to inhomogeneous spatial pumping or boundary conditions confirm this origin of pinning dynamics.