One more thing to keep in mind, additional to the need of adding justify-content:space-between to the flex container and not to the elements themselves; Make sure that you don’t have empty elements (like an empty div or :after) inside the container.
In my case turned out a JS adding an empty div as a “clearfix” from the days before flex, when things were done floating elements.
justify-content:space-between will justify for all the elements inside the container even those with no content, which can mess up the alignment and wrapping.