Mosfet: gate voltage 0 but still led strip on
To solve the issue that the LEDs are still glowing when they should be off I would try this:







simulate this circuit &ndash; Schematic created using CircuitLab

I tidied up your schematic a bit by moving the supply to be more "what we're used to" and adding a ground symbol. But the main fix is R2. Indeed the leakage current of the MOSFET will probably be the issue. You could use a "better" (less leaky) MOSFET but there might be a simpler solution. If only we can provide a path for that leakage current that is such that the voltage will be too low for the LEDs to conduct the current. That path is provided by R2.

You measured 18 V across the LED strips when they're (supposed to be) off. That means some current is still flowing because if no current was flowing you would measure 0 Volt. At 18 V across the LEDs the current through R2 would need to be around 0.75 mA. The leakage current of the MOSFET should be much lower than that 0.75 mA. So much less current will flow. That means there will be less current through R2 and also less voltage across the LEDs. That means they should turn off.

The disadvantage of adding R2 is that when the MOSFET conducts, there will be 24 V across R2 so some current will flow through it (1 mA) which is "lost" as it does not flow through the LEDs. But 1 mA isn't much so compared to the 167 mA of the LEDs.

Try R2 = 24 kohm first, if the LEDs still aren't off, try 10 kohm. If that still in not low enough then maybe your MOSFET is damaged.

If at R2 = 24 kohm the LEDs are off, you can try increasing the value of R2 to 47 kohm or 100 kohm and see if that is still OK. That would lower the 1 mA that is "lost".