Adding the following to the [Unit] section of dnsmasq.service fixes the problem:
After=network-online.target Wants=network-online.target
Adding the following to the [Unit] section of dnsmasq.service fixes the problem:
After= network- online. target network- online. target
Wants=