With only knowing the mosfet is imposible to help you. What current is going trough, gate voltage, configuration, schematic?
If a mosfet heats mostly comes to 3 factors. The gate voltage is not enough therefore the on resistance is much higher than 4.4m ohms, The gate rise and fall times are too slow and transients cause a lot of heat. And your frequency is too high for the mosfet to handle.
For the first factor just leave it on and check the temperature, if it's hotter that it should be, you need more voltage.
For the second keep the same duty cycle and check if slower frequencies generate less heat. If yes. Your rice and fall times are too slow. You need a way to push more current into the gate.
The third one is unlikely this mosfet can reach 12Mhz.