The config from the klippy.log attached to that thread works perfectly fine for my Anycubic Kobra 2.
[stepper_z]
step_pin = PC7
dir_pin = !PC6
enable_pin = !PC3
microsteps = 16
rotation_distance = 8
endstop_pin = probe: z_virtual_endstop
position_min = -15
position_max = 250
homing_speed = 10
position_endstop = 3.500
[probe]
pin = PB8
x_offset = 23
y_offset = -13.5
z_offset = 1.560
You could also home with the endstop switch in the back of your bed.
But you’ll need to configure [safe_z_home] for that method.
The switch is connected to PB12