A laser-driven azimuthal plasma magnetic field is known to facilitate electron energy gain from the irradiating laser pulse. The enhancement is due to changes in the orientation between the laser electric field and electron velocity caused by magnetic field deflections. Transverse electron confinement is critical for realizing this concept experimentally. Using analytical theory, we show that the phase velocity of the laser pulse has a profound impact on the maximum transverse size of electron trajectories. The transverse size remains constant only below a threshold energy that depends on the degree of the superluminosity, and it increases with the electron energy above the threshold. We illustrate this finding using 3D particle-in-cell simulations. The described increase can cause electron losses in tightly focused laser pulses, so it should be taken into account when designing high-intensity experiments at high-power laser facilities.