Anything wrong with this Mosfet H-bridge?
When input switches go open circuit, there is nothing significant pulling charge from the mosfet gates on the low side. Try adding 1 kohm resistors to ground between gate and source on the low side mosfets. Without this addition, you cannot rely on the photodiode circuit for dragging down the gate to 0 volt and this will leave the lower mosfets partially on.

I'm not ruling out that there are other problems of course.