I don’t have a spindle on our Shapeoko, only a laser, but I do test different versions of grbl back and forth quite extensively with PicSender.
You can switch to the grbl 9j for your spindle or vector laser gcode files, then switch to the J-Tech PWM grbl for raster laser engraving.
After connecting to the com port in PicSender, select the yellow GRBL button, then Display Settings, then Save. Name the file something like X-Carve GRBL 9j. Return to the main screen, select Close, not Exit. Open the X-Loader and flash the newer J-Tech PWM GRBL 9g with Homing enabled to the UNO. You do not need to close the X-Loader. Open the Com port again in PicSender, go to the GRBL menu and select Display Settings. Change these settings in the left message window.
$0=30 (step pulse, usec)
$1=255 (step idle delay, msec)
$10=18 (status report mask:00010010)
$11=0.005 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$14=1 (auto start, bool)
$110=4500.000 (x max rate, mm/min)
$111=4500.000 (y max rate, mm/min)
$120=8000.000 (x accel, mm/sec^2)
$121=8000.000 (y accel, mm/sec^2)
I have both of the X&Y Accels set to 12000 on my Shapeoko 2, but it has nema 17 steppers and no added spindle weight to move. You may have to adjust the settings slightly for your X-Carve, but this will give you a starting place.
After changing these values, select Send, then Save again. Name it something like J-Tech PWM GRBL 9g. Return to the main menu, Home your machine and set your work X,Y & Z (Z for focal height) Zeros with GRBL Z Code selected, then change to the GRBL PWM Code to run your X,Y & S command raster Laser engraving file.
To switch back to GRBL 9j, Close the Com port in PicSender, flash the GRBL 9j with X-Loader, Open Com port in PicSender, go back to the GRBL menu, select Open, load the X-Carve GRBL settings, then select Send. Return to the main menu, select GRBL Z Code and your ready to Home your machine and set your work zeros again.
I know it may sound complicated now, but after doing it a couple of times, it will get easier and quicker.