The command stores the setting somewhere. Probably within the user’s home directory.
There are supposedly other locations too that are checked for such settings. See https://wiki.archlinux.org/title/XDG_MIME_Applications
Find the mimeapps.list from home directory and transfer setting to /etc/xdg/mimeapps.list ?
But “Thunar” itself is not part of Rocky, I now see it in “epel”, so people would need to install an unsupported package first before they can make it the default.