Connecting diodes to a motor in H-bridge
The diodes aren't protecting the motor; they are protecting the transistors.  So put them across the transistors.  The current-both-ways problem isn't present at the transistors.