Environment crashes on screen lock

Hello, noob here so apologies in advance for not being precise on terminology.

I've switched from Windows one month ago and been using Fedora39 as a daily driver for a while now. Everything is working as it should, but sometimes this very annoying thing happens.

Half of the times I go AFK and the screen goes off and then I have to log in again, the whole environment crashes and it behaves like I just booted up the machine. All the apps close down and i have to re-open the apps again.

I just lost nearly an hour of work to this.

How can i provide more info to investigate and fix the problem? This is extremely annoying.