This thread is like a deja vu for me.

It seems I am suffering from a very similar trouble also on my machine: After performing a toolchange, sometimes something goes wrong.
The crazy thing is: I was (and I still am) not able to recognize any pattern in the accidential loss of position, except that it happens after tool change, when pressing "Cycle start" to perform Auto-tool-zero.
-The machine is equipped with home switches on all axis' and tool height sensor.
And here is, what should happen:
G-Code runs
Tool change commanded in G-Code
Z, and then X and Y are moved to a convenient tool change position (by M6Start-script)
---
Manual tool change
---
Home Z axis
go 20mm above tool height sensor
then do the whole referencing stuff...
(In fact, this doesn't matter, because it seems, that the "M6End-Script is not even executed, or something bad happens before mach3 can execute the script..)
... and this happens after Manual tool change
maybe an unexpected movement to somewhere in the center of the stock,

maybe there appears the "preparation move" dialog before the unexpected movement will take place...

What I can state:
- The Z Axis is homed by my M6End script before the tool leght is measured, so, if this homing is not performed, I KNOW, that the movement is NOT caused by my script
- This "terrible accident" happens SOMETIMES not ALWAYS, whenever:
- G-Code remains absolutely unchanged (same part)
- XML remains absolutely unchanged
- NO ONE button is pressed during program execution
---> This is the whole story...
This, I feel, is a real quirk, and I know for sure, it will be very hard to find and repair what is causing this trouble.
(maybe some race-condition in mach 3 code, or some other timing problem which also might not be reproducable on any hardware...)
After spending lots of working hours in researching this damned mis-behaviour, I decided to keep my hand just over the emergency-off after tool change and wait for the release of Mach3 V4... (by the way: when...

??)
regards,
Konrad