The correct way to do this, in Debian and derivatives, is to write a file in /etc/NetworkManager/dispatcher.d (call it whatever you like), with the following content:
# Change the metric of the default route only on interface enp0s3
if [ "$IF" = "enp0s3" ]
case "$STATUS" in
ip route del default dev $IF
ip route add default via $DHCP4_ROUTERS dev $IF metric $MY_METRIC
This way, your customization will not be overwritten upon each update.
In order to check this, stop the Network Manager, kill the dhclient and flush the IP address of the interface, then restart network manager.
You can find documentation here.
as per FvD request:
systemctl stop network-manager
ip addr flush dev eth0
systemctl start network-manager
if the interface in question is eth0, otherwise change accordingly.