Confinement-induced transition between wave-like collective cell migration modes