Use Local Group Policy editor by running gpedit.msc and modifying the policy.
Computer Configuration -> Administrative Templates -> Network -> DNS Client
Enable Turn Off Multicast Name Resolution policy by changing its value to Enabled

For Linux
vim /etc/systemd/resolved.conf
[Resolve]
DNS=
FallbackDNS=
Domains=
LLMNR=no
MulticastDNS=yes
DNSSEC=allow-downgrade
DNSOverTLS=no
Cache=yes
DNSStubListener=udp
~
reboot
How to check the llmnr status for windows and Linux through powershell and terminal?