HttpProviderError when deploying contract from Hardhat

:1234: Code to reproduce

executed command = npx hardhat run --network mumbai .\scripts\prepare-upgrade-ENFT.script.js
I am getting ProviderError: HttpProviderError when upgrading my smart contract. I tried changing the RPCs too, but still i get this issue.
Below is my hardhat.config.js

require("@nomicfoundation/hardhat-toolbox");
require("@nomicfoundation/hardhat-chai-matchers");
require("@nomiclabs/hardhat-ethers");
require("@openzeppelin/hardhat-upgrades");
require("@nomiclabs/hardhat-etherscan");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
    defaultNetwork: "localhost",
    networks: {
        hardhat: {},
        mumbai: {
            url: "RPC_URL",
            //url: "https://matic-mumbai.chainstacklabs.com/",
            //url: "https://rpc-mumbai.maticvigil.com",
            accounts: [
                "PRIVATE_KEY",
            ],
            gas: 300000000000,
        },
        polygon: {
            url: "RPC_URL",
            accounts: [
                "PRIVATE_KEY",
            ],
        },
        ropsten: {
            url: "https://ropsten.infura.io/v3/",
            accounts: [
                "PRIVATE_KEY",
            ],
        },
        rinkeby: {
            url: "https://eth-rinkeby.nodereal.io/v1/ID",
            accounts: [
                "PRIVATE_KEY",
            ],
            chainId: 4,
            from: "ACCOUNT",
            gas: 300000000000,
        },
        localhost: {
            url: "http://127.0.0.1:8545/",
            accounts: [
                PRIVATE_KEYS
            ],
        },
    },

    etherscan: {
        // Your API key for Etherscan
        // Obtain one at https://etherscan.io/
        apiKey: "API_KEY",
    },

    solidity: "0.8.9",

    settings: {
        optimizer: {
            enabled: true,
            runs: 100,
        },
    },

    mocha: {
        timeout: 40000,
    },
};

:computer: Environment

Using Hardhat 2.11.0

Did you actually replace RPC_URL, PRIVATE_KEY, and API_KEY when you ran it? This looks like an RPC/Hardhat config issue -- do you get the same error if you just run a deploy for any contract?

Yes i get even when i deploy the code

I'd just suggest to check your mumbai network config and RPCs again.

I was able to deploy once and when i try to upgrade or redeploy proxy i am facing the issue