Go to about:config. Set cookiebanners.ui.desktop.enabled to true, and set cookiebanners.service.mode to 1. Then, go to about:preferences#privacy and scroll down to “Cookie Banner Blocker”, and check the box. (The text implies this only works in Private Browsing mode, but setting the service mode to 1 earlier will make it also work in regular sessions.)