ERC1967Proxy - Verification on blockchain explorer fails if using the latest version

The version of ERC1967Proxy used by OpenZeppelin Hardhat Upgrades plugin is old. So I decided to use the latest version at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/ERC1967/ERC1967Proxy.sol instead.

After deployment I attempted to verify on a blockchain explorer and got the error:

Bytecode does not match with the current version of ERC1967Proxy in the Hardhat Upgrades plugin

I filed an issue at https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/870 but nobody has responded.

Please fix it so that the latest version verifies successfully.

:computer: Environment

Hardhat with @nomicfoundation/hardhat-verify 1.1.1 and Solidity 0.8.21

The master branch of https://github.com/OpenZeppelin/openzeppelin-contracts is not recommended for general use because that is the active development branch and represents unreleased code.

I've posted a comment on the GitHub issue that the version of the proxy contracts deployed by the Hardhat Plugin is the latest recommended version.

But the latest release of openzeppelin-upgrades is importing release v4.8.3 of @openzeppelin/contracts.

Shouldn't it import the latest, which is v4.9.3?

There were no changes from v4.8.3 to v4.9.3 which affect the proxy contracts for deployment.

But it's still preferable to use the latest released code.

Many of the files that ERC1967Proxy imports are different between v4.8.3 and v4.9.3, e.g.:

Added a comment in the issue https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/870#issuecomment-1716422933 to help explain the above reasoning.