Project to automatically remove parts from build plate

This is basically the same post as previous, but an exact cut-out from the gcode sequence when ending and starting again + translating the g-codes and my thoughts (in bold)

G90
G1 X-13 Y180 F3600

G91
G1 Z-1 F600
G90
M83

; ======== eject parts =============
G0 X90 Y180 ; move to middle back of bed
G0 Z1 ; lower X until nozzle is almost touching
M140 S0 ; For some reason you need to set the bed temp again before
M190 S30 ; wait for bed to be cold
G04 S300 ; give the part time to break free so pushing it is easier
G0 Y0 F1000 ; push part of bed
; ==== end eject ==================

M220 S100 ; Reset feedrate magnitude
M201.2 K1.0 ; Reset acc magnitude
M73.2 R1.0 ;Reset left time magnitude
M1002 set_gcode_claim_speed_level : 0

M400 S1 ; Waits until all moves are completed
M18 X Y Z ; Disable all steppers
M73 P100 R0 ; Print progress on LCD
(At this moment Z goes up and you can see the LCD changing @0:16min).

; EXECUTABLE_BLOCK_END

FIRST GCODE ENDS HERE & NEW GCODE STARTS FROM HERE

; EXECUTABLE_BLOCK_START
M73 P0 R19 ; Print progress on LCD
M201 X20000 Y20000 Z1500 E5000 ; Set max acceleration
M203 X500 Y500 Z30 E30 ; Set max feedrate
M204 P20000 R5000 T20000 ; Set travel move limits
M205 X9.00 Y9.00 Z5.00 E3.00 ; Set advances settings
M106 S0 ; Set fan speed
M106 P2 S0 ; Set fan speed
; FEATURE: Custom
;===== machine: A1 mini =========================
;===== date: 20231226 =====================

;===== start to heat heatbead&hotend==========
M1002 gcode_claim_action : 2
M1002 set_filament_type:PETG
M104 S170 ; Set Hotend Temperature
M140 S70 ; Set Hotend Temperature
G392 S0 ;turn off clog detect
;=====avoid end stop =================
G91 ; Relative Positioning
G380 S2 Z30 F1200 ; G380 is apparenlty the same as G38
I assume the fault is here - where Z goes too low @ 0:24min
G380 S2 Z-20 F1200
G1 Z5 F1200
G90 ; Abolute Positioning

THIS IS WHAT MARLIN SAYS ABOUT G38:
G38.2-G38.5 - Probe target
The Probe Target commands are used to probe towards (or away from) a workpiece to determine its precise position. You might, for example, use a grounded metal workpiece, with a metal probe spliced into the bed probe circuit.
G38.2 probes towards a target and stops on contact, signaling an error if it reaches the target position without triggering the probe.
G38.3 probes towards a target and stops on contact. No error is given if it fails to trigger the probe.
G38.4 probes away from a target and stops on contact break. An error is signaled if the target position is reached without triggering the probe.
G38.5 probes away from a target and stops on contact break. No error is given if it fails to trigger the probe.
These commands use the current homing feedrate, by default.
**That might be whats causing the Nozzle to drop too far… **
Now the question: How to mitigate this…

;===== reset machine status =================
M290 X39 Y39 Z8
M204 S6000

M630 S0 P0
G91
M17 Z0.3 ; lower the z-motor current

G90
M17 X0.7 Y0.9 Z0.5 ; reset motor current to default
M960 S5 P1 ; turn on logo lamp
G90
M83
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
M73.2 R1.0 ;Reset left time magnitude
;====== cog noise reduction=================
M982.2 S1 ; turn on cog noise reduction