A friend from the Snapmaker forum wrote that to me:
My guess is Lightburn is not honoring the serial buffer being full, and just sending commands anyways. But the controller isn’t receiving them. So Lightburn thinks it sent the whole program, but the controller hasn’t heard all of it. Then the controller plays through the buffer, and then the buffer ends, usually where a cut ends - and there’s no M05 in the queue to shut the laser off.
Seems a possible cause?!
Buffer size in Snapmakers version of Marlin is 128 characters.