I have had the same thing happen, no idea what has changed, nothing i have done myself.
traced down the problem to the following file: /etc/webmin/virtual-server/config
renaming it, then copied back a version from another system → reboot system,
Virtual min may now have some weird things in the template settings, though at least it works again.
For me this happened on a system that only is used as a slave-nameserver for virtualmin that has been running since 2019. the config on my 3 NS nodes is identical, so i do not have problems after doing this. If you try this, be careful, you may break your virtual domains doing this!.