I have seen many comments that people are having Z stop issues. Some are seeing Z stops “in the air” away from the limit switch, non-repeatable Z axis calibration or occasional Z stop crashes.
I was having similar issues after loading the 4.0.6 firmware on a Balco 5.2c motherboard (without BL touch). With the original OEM firmware the printer had been working well for several kgs of filament.
I eventually realised that the mainboard was receiving intermittant electrical noise on the Z stop limit switch signal. This was being detected with the 4.0.6 firmware but not with the OEM Balco firmware. Perhaps andres excellent software has different switch debounce sensitivity than others.
My problem was eventually and completely fixed by the addition of a 0.01uf capacitor directly across the Z axis limit switch terminals.