Dependence of the electron energy gain on the field polarization of Hermite–Gaussian beam