In your netplan example config, keyword 'optional' means that systemd-networkd won't wait until this interface is up before declaring to systemd that the network is online. THis means dnsmasq is starting before the vlan0 interface is created.
If you remove the optional value that should ensure it is up and configured before the dnsmasq service starts.
In your netplan example config, keyword 'optional' means that systemd-networkd won't wait until this interface is up before declaring to systemd that the network is online. THis means dnsmasq is starting before the vlan0 interface is created.
If you remove the optional value that should ensure it is up and configured before the dnsmasq service starts.