I am using a 3v3 logic level (VCC in schematic) to switch low-current 12v power for a remote sensor (SPWR). The switch is to power down the sensor when not in use to save power. Even with the sensor removed, so that SPWR is open circuit, the MOSFET does magic smoke and dies. I can't fathom what's going on here.
The MOSFET is "P Trench 30V 4A 1.3V @ 250uA 44 m? @ 4.3A,10V SOT-23-3L": https://datasheet.lcsc.com/szlcsc/Alpha-Omega-Semicon-AOS-AO3401A_C15127.pdf
The NPN transistor is an S8050: https://datasheet.lcsc.com/szlcsc/Changjiang-Electronics-Tech-CJ-S8050_C2146.pdf