The default routes which cause the problem are pushed to the OpenVPN client by the OpenVPN server.
Rather then create a script to delete the routes you can simply stop the problematic routes from being created in the first place.
There are two ways to do this:
If you can change the settings on the OpenVPN server, edit the config and remove the
redirect-gateway
option. On my EdgeRouter the relevant line looks like this:openvpn-option "--push redirect-gateway def1"
One a Linux server I believe it would look like this:
push "redirect-gateway def1"
If you can't change settings on the OpenVPN server you can tell your OpenVPN client to ignore the pushed routes from the server. On my Linux client the relevant line looks like this:
pull-filter ignore redirect-gateway
Once you've made those changes and restarted the OpenVPN service you should be able to start Docker containers without the dreaded could not find an available, non-overlapping IPv4 address
error.