I made some progress i didn’t attache ip a and ip r from the container.
The routing seems fine using ip addresses is not an issue.
And as you can see from my network config it’s the default config.
Except for the raw.dnsmasq. This option is a workaround.
The problem is the systemd-resolved on the host which takes forever to fail,
and only then the lxd dnsmasq uses the internal info.
Which I don’t really understand why does dnsmasq for internal hostsnames check upstream dns server instead of returning the internal mapping?