Everytime I deploy an Anchor program on Solana, it creates a new Program ID. Is there any way to upgrade the Anchor program using the same Program ID?
By default, the anchor deploy command will deploy a new Program ID. If you want to upgrade your existing program, use this command
anchor upgrade target/deploy/<PROGRAM_NAME>.so --provider.cluster <CLUSTER> --program-id <PROGRAM_ID>
Where
https://project-serum.github.io/anchor/cli/commands.html#upgrade