Is the ground of the 12 volt supply connected to the RPi ground?
The MOSFET reacts to the voltage between its Gate and Source terminal - if the two grounds are not connected the Gate/Source voltage is undefined, and the Pi output cannot control the action of the MOSFET.
Even though this a a 'simple' circuit there are still lots of things that can go wrong.
Finding a fault is quite an art.
Let's start by breaking the circuit into two parts. The BJT switch and the MOSFET switch.
Design issues
The first thing is to look at the design - what's wrong? (if anything). Not every circuit you find on the internet actually works. Many faulty designs get copied and posted without ever having been checked out.
There are a couple of issues - R3 is far too low giving a base current thats far too high. A simple Ohm's law calculation shows Ib is 10 times larger than the collector current, Ic.
First step - increase the value of R3. Its not a critical value so anything in the range 22k and 100k would be fine.
The second (design) issue was the size of Vgs - the specification quotes 20V so technically the 18V should be ok but engineers are cautious folk and like a bit of headroom. Adding a second 10k resistor halves the input to a very comfortable 9V. If you want to keep the total resistance at 10k then replace R1 and R4 with 4k7 or thereabouts.
The LED current seems fine at around 7mA but for a MOSFET rated at 19A its a bit of a small load. Checking the leakage current value we find a max value of about 250uA so no issues there.
Now to fault finding.
A fault condition is something you don't expect if the circuit is working properly.
A fault in one part of a circuit can cause another part of the circuit to malfunction so try to look at circuits as functional blocks and isolate them if possible
First test the BJT switch (part of the circuit). A 5v input should turn the transistor ON and a 0V input should turn it OFF.
What you should expect is a change in voltage across the collector resistor(s) or at the collector. If not then you have a fault.
Fortunately There are only a limited number of reasons for the fault which are given in the diagram.
Once you have corrected the BJT switch circuit or you are happy that this part works move on to the MOSFET switch.
Again there are only a limited number of possible faults - work through that part of the circuit methodically.
When all faults are cleared connect up the two halves of the circuit. It should now work properly.
Best Answer
Neopixels are not simple LEDs. They have a driver IC inside it. And in addition to supply and ground, there is data pins that are referenced to ground.
It is not correct to turn off the ground of an IC, because it still can leak supply current out of the data pins via IO pin protection circuitry when data pin is pulled low.
Don't disconnect the ground if you need to cut power to the RGB LED.