I've tested it multiple times and it's a problem with your VPN app on Windows 11.
So on my Synology NAS I have a DNS server with 2 custom DNS resolvers on 2 seperate machines.
Every resolver has configured subdomains for my local network devices and it works fine on all my devices.
The problem is when I'm connected via VPN. I configured the tuneling for direct www access and it somehow works but sometimes it looks like the VPN app is ignoring that setting and I cant access my device via the custom local domain. After disconnecting from VPN the problem is gone.