@rafalspuka You tried those steps in a standalone installation or just your regular installation? If in the standalone installation, did you make sure not to enable Opera Sync?
I'm trying to reproduce the issue using the steps you provided, but the folders are remaining.
Try this. In a fresh standalone installation, goto the URL opera://bookmarks, delete all bookmarks and speed dials. Then, empty the bookmark trash. Then, turn on the bookmarks bar and add your bookmarks and folders and bookmarks in the folders. Then, immediately go back to opera://bookmarks and export your bookmarks to an HTML file. Then, upload it somewhere so we can download it and import it.