NEJE Max4 Homing - How to avoid initial move in wrong direction?

I have just set up a Neje Max 4 and all works well except: when homing, all three axes move a few steps in the wrong direction before reversing and moving the right way to the limit switch.

When the toolhead is far from the home position and close to the max values, this causes it to crash.

I’ve never had this behaviour on my other machines. Is there any way to avoid this?

Did you setup your device as GRBL image?
Connect to the laser click Show all and then jog the laser with the arrows


.
Post here the Console output in a reply?
Also with NEJE Win check if you´re on the latest firmware?
.
.
Here post #8 has a material library for Neje.

This is what the console outputs when I jog it once in every direction:

Stream wird gestartet
G21 G54
G91
G1 X0 Y-10 F6000 S0
G90
M2
[MSG: Laser temperature:0.0C]
[MSG:Pgm End]
Stream fertiggestellt in 0:00
?
<Idle|MPos:0.000,450.000,0.000,0.000|Bf:100,1500|FS:0,0|Pn:P|WCO:0.000,0.000,0.000,0.000>
ok
Stream wird gestartet
G21 G54
G91
G1 X10 Y0 F6000 S0
G90
M2
[MSG:Pgm End]
Stream fertiggestellt in 0:00
Stream wird gestartet
G21 G54
G91
G1 Z -10F600 S0
G90
M2
[MSG:Pgm End]
Stream fertiggestellt in 0:01

You didn´t post all the moves.
The only thing worth a try in GRBL settings is:
if $4=0 change to $4=1 (or 3 or 7 depends on your board) or
if $4=1 (or 3 or 7) change to $4=0
After each change disconnect your laser from USB PC and power supply.
Wait 30 seconds reconnect and test.
Report back with results.