N CHANNEL MOSFET STAYS OPEN
but dims if there is no signal


It's hard to guess without a real schematic, but I'm making an assumption here: no signal means that it is left floating.

In that case, you need a pull down resistor from the gate to ground, to discharge the internal gate capacitance. Something like this:







simulate this circuit &ndash; Schematic created using CircuitLab

The value is not critical, it can be anything between 10 k&ohm; and 1 M&ohm;. You can also place it before R1 if you want.