Had same issue when the popup would come back after each page refresh on `www.stackoverflow.com`, regardless which button I press or what cookies I chose to enable.
But once I visited `meta.stackoverflow.com` and accepted only `Functional cookies`, the popup no longer shown anywhere.

So the culprit was that `www.stackoverlow.com` only sets one cookie: `OptanonConsent` which stores your preferences of allowed cookies in the following format:
```
groups=C0001%3A1%2CC0002%3A0%2CC0003%3A1%2CC0004%3A0&landingPath=NotLandingPage&datestamp=Wed+Mar+31+2021+19%3A09%3A03+GMT-0400+(Eastern+Standard+Time)&version=6.10.0&hosts=&isIABGlobal=false&AwaitingReconsent=false&geolocation=%3B
```
Where

 - `C0001` = `Strictly Necessary`
 - `C0002` = `Performance Cookies`
 - `C0003` = `Functional Cookies`
 - `C0004` = `Targeting Cookies`

Each setting followed by `%3A` (which is URL encoded column `:` sign) and a number `0` or `1`, where `1` means enabled. So in the example above only `Strictly Necessary` and `Functional Cookies` are enabled.

**To prevent the popup from showing again, another cookie must be set: `OptanonAlertBoxClosed`** with any value (even empty), by default it sets with the date cookie preferences were changed, i.e `2021-03-31T23:09:03.572Z`

For whatever reason `www.stackoverlow.com` does not set this cookie.