Update:
I checked PPR encoder and it is 1024 on encoder, so that should be ok.
I tried to change the value in Pokeys plugin to 2000 PPR, and it worked! No error at all!
The rev counter was around half rev it was before with same spindle speed.
The feedrate during threading of the Z axis was lower as well, so now I can try numbers 1.66% higher than 1024.
It solves my problem (now I can just use pitch 1.5 in the Gcode file) but this is a work around offcoarse.

The other thing to check was Z axis calibration: over 300mm the error was 0.5mm. You are right this is quite much..
But the difference I have on the pitch would be 5mm over 300mm, so I doubt that it is the reason of the error.
The stepper motors are 200 steps/rev, spindle is 6mm/rev, so 1 unit is 200/6=33.33. I just did not use the .333, so now it is better.

So first I will try with the new calibration setting if the pitch is better or not because I was not able to test it with actual material.