You seem to have a lot more code than I would write. But to adjust the size you need to use tool compensation. You would have the tool diameter entered into the diameter compensation for the tool # and then the code would be something like this using the center of the hole for the work zero and the top surface for Z tool length offset. This is for right hand thread.
G00 X0. Y0. Z.1 Move into position with Z clear
Z-.06 Move down to thread depth
G41 D01 G01 Y(OD/2) F1. Move out to the thread OD using the radius
G91 G03 I0. J-(OD/2) Z.0139 L5 Helically interpolate up out of the hole
G40 G00 X0. Y0. Z1. Cancel tool comp and move clear in Z
Now you adjust the size with the diameter wear on the offset page.
There are additional things that can be included such as doing a tangential entry into the cut but that is not really needed with such a fine thread.
Of course if your machine cannot handle the incremental helix you have to program every G03 in absolute but you do not need X Y values on the G03 line just the I J and Z
An open mind is a virtue...so long as all the common sense has not leaked out.