Controlling a 12V circuit with a RaspberryPi via PWM
No, this will not work. You have drawn a high side driver using a PNP. The emitter of the PNP is at 12V, so to drive the PNP into cutoff (turn off the heater) you must bring the base voltage close to 12V. The output of the Raspberry Pi can't tolerate, nor produce, a voltage that high on an output pin.

You need a proper low side driver.