Direct evidence of a full dipole flip during the magnetic cycle of a sun-like star