I'm use the sync command with the --archive option with rex. Even when running this command with sudo, group ownership of files is lost and reverts to owner or user running the rex script.
Using the rsync --archive command directly as sudo without rex worked fine and group ownership was retained.