Understanding and eliminating spurious modes in variational Monte Carlo using collective variables