The problem is that the settings UI only allows typing a hostname, not a full URL.
The Settings app is heavily customized by Android vendors and can't be updated on all devices in lockstep with the DnsResolver module. Hopefully it will be fixed starting from Android 13.