Hi,
I still think you are gaining or losing steps and not just restricted to the Z axis.
The acceleration setting in motor tuning is very important, if its set too high it will loose steps. One recommendation is to set it
at no more than 10% of the velocity setting. The general principle is start slow, very slow and then increase the settings until it
starts misbehaving and then back off a bit.
Craig