Different wave functions with the same $|\psi(x)|^2$ represent different physical states (unless they are proportional). Different states means that one gets different measurable results on at least one kind of measurements. The same $|\psi(x)|^2$ gives the same probabilities for position measurements (only), but generally not for measurements of other observables such as momentum. For the momentum probabilities, the absolute squares of the Fourier transform counts, and this is usually different if only the $|\psi(x)|^2$ are the same.