I think I understand what you mean here.
In my case this is all taken care of by the trajectory planner part of the control system. As the X axis nears the end of it's travel it's speed starts to decrease (deceleration) and the planner starts to reduce the available laser power level to match the reducing speed ending with zero speed and zero laser power level. Then the Y axis is incremented for the next line. The planner then increases laser power as speed is increased (acceleration) at the start of the next line until max speed and max available laser power is achieved. And so on.......
I presume most planners work this same way.