H-Bridge Drive Power Flowing Up Logic
This is not a desirable situation. You can avoid this by putting a diode on the Arduino output. This will prevent voltage from H-bridge to damage you output.

Anode will connect to the Arduino and cathode will connect to the H-bridge.

Edit

Having a look at the L298N datasheet I noticed that the minimum logic voltage is 4.5 V, since 1N4001 (as suggested before) has a forward voltage of about 1V that would not work. So instead you should use a schottky diode that has lower forward voltage and can meet the minimum voltage requirement for L298N.