Direct laser acceleration of electrons is an important energy deposition mechanism for laser-irradiated plasmas that is particularly effective at relativistic laser intensities in the presence of quasi-static laser-driven plasma electric and magnetic fields. These radial electric and azimuthal magnetic fields provide transverse electron confinement by inducing betatron oscillations of forward-moving electrons undergoing laser acceleration. Electrons are said to experience a betatron resonance when the frequency of betatron oscillations matches the average frequency of the laser field oscillations at the electron position. In this paper, we show that the modulation of the laser frequency as seen by an electron performing betatron oscillations can be another important mechanism for net energy gain that is qualitatively different from the betatron resonance. Specifically, we show that the frequency modulation experienced by the electron can lead to net energy gain in the regime where the laser field performs three oscillations per betatron oscillation. There is no net energy gain in this regime without the modulation because the energy gain is fully compensated by the energy loss. The modulation slows down the laser oscillation near transverse stopping points, increasing the time interval during which the electron gains energy and making it possible to achieve net energy gain.