I bumped into this error while trying to deploy my smart contract on remix IDE using brave browser. Based on accumulated research and personal experience, the following should help in fixing the issue.
Firstly, you should restart your browser (this may be common with chrome and brave browsers) and redeploy your contract.
If the first option doesn't work, try clearing browser cache (ctrl + shift + delete). Make sure to save your work somewhere else as clearing the browser will delete the copy of your work.
In a normal circumstance, the above-proposed solutions would work and you can get your work going. However, should the problem persist, change your browser and reload remix there.
or just restart your PC