So first of all, matchpathcon /etc/systemd/resolved.conf.d/private-dns.conf tells me that your file ought to have a context of system_u:object_r:systemd_conf_t:s0.
Regarding your actual problem: Maybe you just forgot the -R switch to restorecon? You invoke restorecon . on the directory, not the file.
In my case I have no /etc/systemd/resolved.conf so I cannot use it there. And using it on files where I changed the labels manually also outputs <<none>>
matchpathcon just tells you what SELinux has configured for the file_context of a path–it doesn’t look at or change files on disk. restorecon -R should restore the actual directory/files to what is configured in SELinux when you run it. You show that you ran restorecon . but that would only fix the context of the directory, not the files within the directory. If you run restorecon -v -R /etc/systemd/resolved.conf.d it should fix the file contexts of the directory and all files in there. This is what happens when I do that on Fedora 41:
>sudo mkdir /etc/systemd/resolved.conf.d
>sudo touch /etc/systemd/resolved.conf.d/foo.conf
>sudo restorecon -v -R /etc/systemd/resolved.conf.d
Relabeled /etc/systemd/resolved.conf.d from unconfined_u:object_r:etc_t:s0 to unconfined_u:object_r:systemd_conf_t:s0
Relabeled /etc/systemd/resolved.conf.d/foo.conf from unconfined_u:object_r:etc_t:s0 to unconfined_u:object_r:systemd_conf_t:s0