I ran into the exact same problem as you when my microwave oven refused to work with my modified sine wave inverter. The theory of filtering is that a square wave is really a sine wave with a great deal of harmonic noise. If you filter out the harmonics, you end up with a pure sine wave. In practice, building a filter is tricky because it's performance depends a lot on the load it sees. If the load changes, so does the attenuation of the harmonics. I experimented with several different filter designs, but was never able to come up with a filter that would run my microwave.
Some power line conditioners will do a fairly good job of converting a modified sine wave into a pure sinewave. If you shop for one, make sure that's one of the features. The Elgar 6000B is one such older model. It works by creating a pure sine wave as a reference. The modified sine wave is fed into a transformer. A difference amplifier compares the transformer output with the reference voltage. Power amplifiers adjust the output to match the pure sine reference. The 6000B runs my microwave for about a second before the internal 15 amp circuit breaker trips. So now I have a nice sine wave maker capable of 1000 watts output that I'm not quite sure what to do with.
Sola Hevi-duty constant voltage harmonic neutralized transformers will also eliminate harmonics and transform a modified sine into a pure sine wave, but at a cost. The primary windings draw 7 amps no load. That's 840 watts! Under load, the efficiency goes up to 92%. My latest attempt to vanquish my microwave will involve designing some electronics to go with my Sola transformer. The circuit I envision will keep the modified sine wave connected and the transformer disconnected unless the current demand exceeds a certain setpoint (signifying the microwave is trying to run). Then the transformer will cut in and the modified sine will cut out until the current drops back below the setpoint.
This got kinda long. Sorry. --Tom