This is by design, as per RFC6762, .local domains are meant to be resolved locally using multicast DNS (mDNS) or against local DNS.
https://en.wikipedia.org/wiki/.local
It's not that you can't make it work, but the nature of this domain makes DNS libraries and software handle it differently to other domain names.