I started having this issue as well (FLSUN printer, MKS Gen L board with Marlin 1.1.9 and TFT32) after some successful prints (identical g-code). I suspected the display. My last 4 or 5 prints failed in the middle. The head was frozen either fully (which ended the print) or temporarily, got clogged and a part of the print was missing. I disconnected the display yesterday and the same model printed without any problems. With Repetier server, I think the display is not necessary.
Is it possible that the display or its wiring could disrupt the communication? I suspected the display because when I operated the printer from the display and R-S, it sometimes stopped reacting either on the display or on the R-S commands.
Edit: On my FLSUN QQ-S I have had no problems like that.