Hi womer,
I see once again the problem of internal diode of 5V MOSFET.
because when 24V is ON then the internal diode of 5V mosfet will be forward biased because of 24 on Anode side and 5V on cathode side so this may be leading to wrong results.
To confirm the problem, remove 5V mosfet and test for 24V alone if this works then connecting a diode(schottky) between 2k2 and 5V mosfet drain may solve the problem, but during opertion with 5V there will be drop of 0.4V
Babesh.