GRBL: inaccurate on X axis by ~4 mm on 400 mm
This seems to be either a case of either belt slop or missed steps or it is a case of the accuracy of the limit switch. 

If the limit switch moves even a little into either direction, you have to account twice that as the maximum error. So the 4 mm error could come from 2 mm into either direction from the 0-position.

However, there is a silver lining: Laser engraving, just like CNC, usually first dials in the 0 regarding the workpiece instead of the 0 of the machine. As long as the machine's movement is ok, you should be fine even without tightening the mounting of the X-endstop. I suggest to run the following test to find out what kind of error actually hounds you though:


Mount a waste piece
Go to a position on the workpiece
Run the laser for a split second
X10
Run the laser for a split second
Repeat 4&amp;5 till you have 10 points
Measure the real distances between the dots engraved


If the distances are always the same but short, you have the wrong steps/mm set and need to adjust them accordingly. If the distances are inconsistent, you have either lost steps or a sloppy belt. To fight lost steps, carefully up the signal to the motor a little. If the results don't change from that, tighten the belt a little - it should sing like a guitar string.