The upgrade function is used repeatedly with the current version of the smart contract as an argument for the new version, but instead, a new one should be deployed

If the implementation contract that you are upgrading to is detected to be the identical to one that you previously deployed, it will use the existing implementation address. See Upgrade contract without changes to storage layout - #2 by ericglau

It will always run the upgrade when you call upgrades.upgradeProxy, because:

  1. The upgrade function on the contract is expected to emit an event, and
  2. You might want to call an arbitrary function on the contract when running it