https://addons.mozilla.org/en-US/firefox/addon/popupoff/
Popupoff simply removes those pop ups and since you can't see the dialog to accept the cookies it is like not having given consent to cookies. (It sometimes makes the site not work properly, but you can set global and site specific to mitigate the issues.)
I even asked the developer here to make sure.
I also managed to install it on my android, to do this follow this guide https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/