How exactly are ions in a Mass Spectrometer accelerated?
The acceleration of the freshly generated ions is stepwise (similar to a linear particle accelerator), i.e. the beam of ions is guided an array of electrodes with a small opening in their centre, as schematically depicted below:



(image source)

Hence when ions approach the first accelerator electrode from the left hand side, their interaction with the subsequent accelerating electrode already phases in.  Ions passing the slit of the first accelerating electrode will experience an even stronger accelerating force by the subsequent accelerating electrode.  Eventually, their momentum will increase further; and on the same time, the ions preferentially will keep their direction of propagation towards the mass dispersive element (here: the magnet), regardless the attractive force between them and the last accelerating electrode.