That’s a post processor problem.
Feel free to use mine here.
If you really want to use the grbl one that’s in the Fusion Library, you can swap these two lines:
writeBlock(modalCodes, gMotionModal.format(motionCode.multi), xOutput.format(position.x), yOutput.format(position.y), feed, additionalCodes[0]);
and
writeBlock(gMotionModal.format(motionCode.single), gOffset, zOutput.format(position.z), hOffset, additionalCodes[1]);
so the Z axis move is first.
They are lines 1601 & 1602 in the grbl post I just looked at. Just switch the order of the two lines.