@Niels-0 have you tested the Z endstop, to check that it doesn't appear to be already triggered to RRF? If it appears to be triggered at the start of the Z homing move then RRF will skip the G1 H1 Z500 F900 move and proceed directly t the G1 H2 Z-5 move. You can check that Z endstop using either M119 or the object Model Browser in DWC.