How can i stop DC motors from dropping out my arduino?
You have two issues here. 

As Charles mentions, there are no free-wheeling diodes present.

In addition to that, when you reverse the polarity on the motor while spinning you effectively try to stack the back EMF on top of the supply rail. This also back-feeds the battery with a higher voltage.

You need to add some circuitry to isolate the supply during those transitions..







simulate this circuit &ndash; Schematic created using CircuitLab

Note the free-wheeling diode need to be duplicated for each motor.

See this cross-post.