Don't know why it's doing this never seen it before but the reason it kept going after feed hold was because it was emptying the buffer.

Have you done a check to see if your missing steps from the pulse being on the wrong side of the edge.? If not then Zero the Z-axis and mark it's position then write some G-code so it moves back n forth several 100 times, only needs to be short moves. Make the last move go back to Zero.
If it doesn't return to the mark then you need to change the active Hi/Low in motor tuning for that Axis.