Navigate to the following settings page in Edge browser:
edge://settings/content/cookiesUnder Clear on exit section,
enter the following items: http://* and https://*Under the Allow section,
start adding the Microsoft domains from this repository,
using this format [*.]Microsoft.com
Now every time you close your Edge browser, the cookies of the websites that are not in the Allow list will be removed. This can effectively increase your security and privacy on the web, without breaking websites functionalities.
You can optionally add any other website's domain that you don't want to log out of every time you close your browser to the list.All of these settings are synced so you only have to do these once.