MOSFET in LTspice sim conducts below the threshold voltage
Add a pull-down resistor, maybe 5-50 kohms between the comparator input and ground.

Change the FET to a PMOS type. Keep the source and drain connections as they are.

Invert the signal from the MCU (send a 1 when you previously sent 0 and vice versa).