You’re right, Opera removed the direct “clear on exit” toggle that used to be in the settings. At the moment, the only way to get a similar effect is to go into Settings > Privacy & Security > Clear browsing data and set it up manually, or use private browsing mode so nothing is stored when you close the browser.

Another workaround is installing an extension that automatically clears cookies/history on exit, since Opera supports Chrome extensions.

Not as convenient as the old built-in option, but that’s the current situation.