For large-scale free-electron laser facilities based on linear accelerators, the laser saturation point is not frequently fixed in the undulator, which will cause a longitudinal source point drift of the beamline. The longitudinal source point drift will cause an instability in the performance of the beamline, especially affecting the energy-resolving power of variable-line-spacing grating monochromators for soft X-ray beamlines. A method of adjusting the fixed-focus constant to compensate for this longitudinal source point drift is introduced in this work. Simulation results indicate that this method can effectively recover the energy-resolving power of the grating monochromator.