Its still being told to go somewhere it thinks it can't.
Is it just Z thats faulting now?
That code appears to be from Vectric, check the end of the code to see if there is an M05 line, vectric seems to leave these out which is odd, my one did anyway.
You should be able to post the code file as you did the pictures - add attachment, maybe change the file name by putting your name in front etc first, or open it in notepad and screenshot it if its a short code.
When you home Z is home at the topmost part of the travel?
X&Y zero at front-left corner?