I think I solved the issue by writing a small TCP-Passthrough that creates a TCP-connection to both the laser and LB. This should then also be able to inject an additional gcode to switch the laser source: