but some how the sine wave cannot be invert.
It surely works with a correct circuit, e.g. good old 741, unless the signal frequency isn't too high. I assume it's 50 or 60 Hz.
But your MOSFET driver circuit is completely wrong. You're missing a suitable high-side driver, e.g. a level-shifting bootstrap
driver IC as IR2110. As shown, the high side FET could be immediately destroyed by a -400V gate voltage. Or it's simply
not turned on.Also driving the gate voltage leading edge with a 1K pull-up resistor results in a poor switching performance.