I am just now dipping my toes into this as well as an option for our machines. I think there are various ways to accomplish the same thing here and do remember reading how important the S parameter is for any and all commands when running a laser - so my assumption is adding the S parameter on the G1 moves will work, but I haven't yet tried it..
We have a copy of Vectric VCarve Pro that I recently upgraded with their laser plugin. One of the defaults is for the OozNest Duet (I know right? OozNest and oozeBot.. small world). They are using the Duet 2 as the controller for their hobby CNC machines and have instructions to add a laser on their website. Here is a sample of the code their Vectric post-processor generates:
T1
G17
G21
G90
G0Z20.320
G0X0.000Y0.000
G0X34.827Y38.358Z5.080
G1Z0.000S0F762.0
M3
M3S1000
G1Y62.302
G1X56.947Y53.139
G1Y29.196
G1X34.827Y38.358
G0Z5.080
G0X56.946Y60.322
G1Z0.000S0F762.0
M3
M3S1000
G1X33.370Y67.705
G1X56.946Y55.533
G1Y60.322
G0Z5.080
G0Y62.716
G1Z0.000S0F762.0
M3
M3S1000
G1Y67.505
G1X31.194Y75.779
G1X56.946Y62.716
G0Z5.080
G0Y74.688
G1Z0.000S0F762.0
M3
M3S1000
G1X29.013Y83.873
G1X56.946Y69.899
G1Y74.688
G0Z5.080
G0X81.279Y69.398
G1Z0.000S0F762.0
This is very similar to the gCode produced for our other laser engraver.. but again, I have not yet tested any of this.
And FYI, while I wait on our new Opt Laser head to arrive, I'm working on our own post-processor for Vectric we'll be releasing. I'll pick up a copy of Lightburn here soon to do the same as we understand most people won't be able justify the cost of Vectric's solution.