You need a pullup resistor between Vin and Vdd:
1K or 10K
Otherwise when Vdd goes below 3.3V, Vin gets connected to nothing, floating, and the mosfets won't switch.
Then it should work.
But it would work also with only the N-channel mosfet, with the circuit in post #8, but with the N-channel mosfet instead of the BJT.
