I think what you want to do is make compensating moves in X and Y as Z moves?
There are a few ways to do this I can think of.
The simplest to set up, but least convenient to use, would be to add some "offset" components in HAL between the axis position commands and the stepgens.
You could then pass Z-position into a "scale" component for each axis, then pass the output of that to the stepgen.
You could manually tweak the scale and offset of the "scale" components to achieve the alignment you want.
www.linuxcnc.org/docview/html/hal/basic_hal.html
www.linuxcnc.org/docview/html/man/man9/offset.9.html
www.linuxcnc.org/docview/html/man/man9/scale.9.html
Alternatively you could write a custom kinematics module, an example of something similar is the skew-correction kinematics written to correct a skewed machine:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...y_XY_skew_correction
That approach would require installing linuxcnc-dev so that you can use the "comp" compiler macro to compile/install the code.