EDIT 2: all sorted now, thank you to those involved!
EDIT: Device Services (com.samsung.android.kgclient) v3.2.47 is the cause. Frustrating that you can't uninstall its updates and disable updates to it, since it's done by the system and not Galaxy Store.
Starting few days ago, the Private DNS setting on my S24 Ultra (Oneui8) is automatically reverting from any specified hostname to "Automatic", and DELETES the custom hostname rather than keeping it as an option, every single day at precisely 9:11 or 9:12 PM.
I have tracked this override to a scheduled routine executed by the system application "Device Services" with the package name com.samsung.android.kgclient (a Knox Guard related component). I've sent an error report with a log to Samsung, so I hope they do something.