Hardhat+UUPS: Deployment at address 0x... is not registered

We are facing an issue with trying to test an upgrade of our live deployed proxies via upgradeProxy with the error:
Error: Deployment at address 0xDc4db.... is not registered.

The UUPS proxy has been deployed via hardhat/hardhat-deploy. Due to lack of support for UUPS proxies, we are not aware of a way to upgrade a UUPS proxy via hardhat-deploy.

Existing issue discussion proposed to manually copying over into a mainnet.json file but these solutions seem only to work for Truffle.

Related discussions:

Hi @Marcel_Jackisch. The solution you described should also work for Hardhat.

I would recommend doing a deployment of a UUPS proxy for your existing contract to Hardhat Network (i.e. locally), and then copying the generated .openzeppelin/unknown-31337.json file to .openzeppelin/mainnet.json, replacing the relevant addresses (impl and proxy) for your addresses on mainnet. Then you should be able to run the upgrade based on that file.