@Pamprika Opera doesn't have an option to automatically pin tabs. You must be triggering a bug somehow. If you can figure out how to trigger it, that'd help.

Your session files might be corrupted. You can goto the URL opera://about, take note of the "profile" path, close Opera and delete the "Sessions" folder in the profile folder. That will wipe out all tabs in all workspaces in all windows, wipe out all windows themselves and clear the recently-closed tabs list, but it might fix it. As to whether it remains fixed, you'll have to see.

If you need to save tabs before doing that, in each workspace in each window, you can right-click on a tab, goto "save" and choose "all tabs to a speed dial folder". Then, you can edit the name of the folder to shows what window and workspace it's from. Then, once you wipe out your session files, you can right-click on each of those folders is the corresponding workspace in the corresponding window and choose "open all".