Running it from a gcode file AND from a VB file are two totally seperate things.
The Gcode file will be very stable BUT the VB

(;-) as you have seen requires YOU to try and keep it synced.
Don't worry about pretty code worry about making it work right (;-) TP
I try to NEVER run a gcode from VB if at all possible.
Here the G53 has always been rock solid no surprises. NOW one thing to remember IS you must REF home the machine BEFORE mach truely knows where anything really is. IF you are just testing and DO NOT HAVE the home switches active then MACH canand will assume that it is somewhere where it is not. UNTIL you refhome you should not run the G53 and expect it to know where it is.
I would try a complete and total reload of mach. Delete the driver manually and all the files then reload a fresh download. Rebuild the XML manually and start again.
Been there done that, (;-) TP