I have this same exact problem on my A6 printer. The A8 and A6 have the same z-axis parts.
At fist I suspected the z limit with was suck in the closed position and sending a constant logic “low” to the processor. I unplugged the switch from the main board and tested the switch with an Ohm meter. The switch was fine. You should check you Z switch the same way I did
My switch was good. So next I checked the voltage being sent to the switch. It should be getting 5 volts from the 10K pull up resister (there is a 103 printed on it) . My board was supplying only 1.6 volts. This is a “logic low” So with the z-switch open the CPU gets sent 1.6 volts and with a closed z-switch the CPU gets zero volts. In either case the CPU sees a logic-low signal.
This is a warranty issue. The board is defective. I’m certain I could repair this but attempting it will void the warranty. My plan is to wait until the replacement comes then repair the one I have. I suspect the debounce cap is leaking.
In summary (1) check if the switch is OK, If it is bad then that is your problem. If switch is good check volts out from socket.
WHY? Why did I suspect a a switch that is stuck closed. The home logic moves the axis into the switch until it closes then reverses direction. I observed only the reverse diversion so Figured the software must’ve detected the closed switch.
If you mainboard is not under warranty then replace it with a generic RAMPS 1.4 board. It’s cheaper and a little more flexible