The option "Always clear cookies when windows are closed" is a per-site setting within opera preferences. When enabled, this setting should cause the removal of all cookies upon closure of a site's window. And up until recently it worked flawlessly.
System:Fedora Linux 37 (MATE-Compiz) (x86_64; MATE)
It doesn't work anymore. Cookies are left behind.
I'll use wired.com here as an example, as I had the function active on this site for years in order to override the "you have reached your monthly limit of free articles".
To reproduce it is necessary to set:
[*.]wired.com as "Always clear cookies when windows are closed" under opera://settings/cookies
Then you'll need to open one Wired article such as this one:
You'll notice that there are now 15 cookies set by a couple of wired.com subdomains.
Upon closure of the article's window all of those cookies should disappear, but as you can see from opera://settings/content/all , most of those are still there after closing it, and they'll still be there later, when returning to wired.com.
Please note that the auto-deletion of cookies "at opera exit" and the manual deletion of cookies are both unaffected by this bug and thus work as expected.