In the menu under Extras \ Postprocessor you will find a dialog, with the help of which you can change the GCode afterwards.
Please check if one of the two marked functions can help you.
May I ask why you transfer the GCode with UGS to the controller ? You could also do that with GrblGru.