Some suggestions:
don't use M280 commands explicitly to deploy and retract the probe anywhere except in deployprobe.g and retractprobe.g. if you need to deploy or retract the probe explicitly, use M401 and M402 instead. That way the firmware can track whether the probe is deployed or not.
probe deployment is handled automatically in firmware 1.19 and later. So you don't normally need to use M401 and M402 anyway, except perhaps in bed.g to deploy and retract the probe just once instead of at every probe point
in your homez.g file and Z homing section of homeall.g, use a G30 command not a G1 S1 Z command
if mode 5 isn't working, this suggests that the output voltage of the Z probe is too low
if it is trying to exceed the bounds of the Y axis, this suggests that your M208 settings for the Y axis are not correct.
HTH David