FreeBSD offers write protection by allowing you to set files as immutable, to do this you will need to set set a special bit. Once this bit is set no one can delete or modify file, this includes the root user. The only user that can set and clear immutable bit is the root user.
To list what bits are set use ls -lo
No bits set
ls -lo
drwx------ 3 root wheel uarch 12 Oct 13 2021 testfile.txt
Immutable bit set (see schg flags are set)
ls -lo
drwx------ 3 root wheel schg,uarch 12 Oct 13 2021 testfile.txt
chflags schg testfile.txt
chflags noschg testfile.txt
chflags also supports a number of other flags