I believe it might be doable based on this post I found below:
If that " Touchscreen Z offset M421 Q commandM206 G1029 D which is a secret undocumented gcode Snapmaker added" is true then we should be able to read that value and change it on the fly.