Hard to see why it would work at all, because you don't seem to initialize Software serial (which, by the way, doesn't work well or at all at 115200 Baud). Use a hardware serial port or Altsoftserial instead.
The two "//" at the beginning turn this line into a comment:
// Serial1.begin(115200);//set the Baud rate of LiDAR and Arduino serial port
Don't use delay(). Study the "blink without delay" Arduino example, or "how to do multiple things at once" to learn how to use millis() instead.