@Bucking_Horn's reply from above has covered this already. Local DNS records are intentionally designed as simple HOSTS-like records and wildcards just aren't supported by this format.
Typically, it is best to not use wildcards but define every legit domain individually, however, I do see that this puts additional maintenance burden on the DNS admin.
You can either resort to address=/.../... syntax in additional dnsmasq lines or you can also use regex with forced replies like
(^|\.)mydomain\.com$;reply=192.168.2.1
to always reply with said IP to mydomain.com and all its subdomains. This gives you the entire power of regex e.g.,
\.mydomain\.com$;reply=192.168.2.1
would only match subdomains but not the domain itself. This may be useful if you have some website on mydomain.com but want to have everything else, like printer.mydomain.com pointing to your local IP address.