Different behavior: Finder Copy vs 'cp' command
I am working on a bug in our deployment script for our organization.
The step in question copies an entire directory of apps that do not have their own PKG installers:
cp -rf /Volumes/DEPLOY/apps/ /Volumes/Macintosh\ HD/Applications/
This step worked fine on macOS 12 but is no longer functioning as intended on macOS 13.
When this deploy script is run, the applications are copied but Finder tells me that the apps are "damaged" and forces them to be deleted (even though the OS fails to delete them and they must be cleaned up manually).
Copying the entire folder of apps via the Finder into the Applications folder works fine, and the apps aren't damaged when copied in this manner.
The script is being deployed as sudo in order to invoke 'installer' to install the remaining PKG files as well as Rosetta.
Is there a reason that these applications do not copy properly with the 'cp' command in zsh, and if so- what is the proper syntax to copy this folder so that the entire app is copied and the OS does not consider the app "damaged"?