mosfet inverters
What kind of gate drive circuit do you use ? for PWM inverters you must use a dedicated IC like IR2110, 2113 which can charge/discharge MOS-FET gate very fast. if you used a simple circuit like in modified sine inverter, with just one transistor and resistor for chare/discharge, this is the result.
there are other options too, like fast optocoupler followed by a gate drive, or gate transformer, but the ideea is to be able to source/sink current fast enough, in terms of tents of nS. also the gate resistor must have the value b etween 10-47 ohms, and frequently is connected in parallel with a diode which have the role to dischae the gate faster than it charge.