You cannot solve this problem of driving a 400V 20A motor using Pch MOSFETs. They do not exist with sufficient 600V Vds and $$Pd= (R_{dsOn}+DCR_{motor}) * I_{sc}²$$ (Isc=start current = start surge) for motor winding DC resistance, DCR causing worst-case surge current \$I_{sc}=V_{dc}/(DCR+R_{on})\$ (Ron of bridge = Rdson (Pch+Nch)).
Here your Pch is 350 mOHms and DC motors draw 8 to 12x rated current on startup. This means 400V/20A=20hms so while rated motor is 400*20A=8kW , surge power is 8 to 12x this if full acceleration or an average power draw of 80kW.
So you are planning to use a 5mA Optoisolator to drive a 80kW surge load. That will not work. Then the typ. full acceleration surge current is 200A²*RdsOn= 14kW means the mechanical guy or "you" have to design a heatsink for that surge power dissipation in the Pch for some period of time.
Now your Tesla race car driver is really in the hot-seat.
It MUST be a Quad Nch FET or IGBT full-bridge using the lower side for PWM to create a boost voltage to drive the high side Nch switches.