Your touch plate script is working correctly. Repetier-Host can get out of sync with the actual position reported by Marlin. I cannot pause your video to see if that is the case in this situation. The touch plate g-code code you list above leaves the tip of the bit a Z=5, so the tip of the bit is 5mm above the Z=0 (top of the stock).
In terms of cutting, you have some choices. If you are having Repetier-Host or your CAM (EstlCAM?) insert start code, it is common to have a G92 X0 Y0 Z0. That will not work with your touch plate g-code. The G92 will lock in the current position (Z=5) as the Z=0 position. The most common choices to fix this problem are:
don’t put a G92 in the start code or at least one that sets the Z axes. This is my choice. The issue is that, if you don’t use a touch plate to set up a job, you must remember to set the Z=0 correctly before running your script.
Extend your touch plate script so that the bit is at Z=0 when you start your job. For example, you could add these two lines to the end of your touch plate script:
M0 S3 Remove the touch plate
G0 Z0 F400
This code will give you 3 seconds (S3) to remove the touch plate before lowering the tip of the bit to Z=0. The only issue is that, if you don’t remove the plate, your bit will drive into the touch plate. I’ve had this happen to me (for other reasons), and the touch plate was fine, but your milage may vary.
Ok, I figured it out… I had a 2mm/revolution lead screw installed, where I should have had an 8mm/revolution. I swapped out the screw and nut and it works great.