Installing apps into Applications folder on macOS 12

An applet we have for archiving the current app and installing a new version in /Applications has stopped working on our servers that IT has finally gotten around to upgrading from 10.14 to 12.3.1. The command that fails is moving the new app from ~/Desktop to /Applications (via tell “Finder” move fyl to appFolder with replacing), with the vague “The operation can’t be completed.” code -8058.

Am I correct in assuming this is some new even more limiting security feature in 12 that wasn’t there in 10.14? How do I get around it? I tried silly things like adding a “choose file name” before it, defaulting to the name of the file I’m trying to move into the Applications folder, hoping it would give the applet temporary sandbox access or something like that.