High Voltage Power supply with current limiting output
The reason your mosfets are shorting is simple. You are pushing WAY too much power through them. Yes they are rated for 400 Volts. And yes, they are rated for 10 amps. But their wattage rating is only 125W. At 300 volts and 4 amps, you are trying to get 1200W of power out of this circuit. At best, shunt regulators like this have 60-75% efficiency, so at 1200W out, that little FET is trying to dissipate 300W or so all by itself. Frankly, I'm amazed the whole thing did not go up in smoke. For what you are trying to do, you probably need 4-8 of those mosfets in parallel to drive that kind of load.