I asked Autodesk to add G30 to the safe retracts last year. As long as your post isn't older than 10/12/18 then you should have the option to use G30 as well.
That way you can move your table Front and Center once the program is finished.
But, originally, you just wanted the Z to retract only; removing the writeRetract(X, Y); will cause only the Z to retract.