has anyone experience this: that the phone is on the second profile and you go to unlocked but suddenly it goes to black, the GrapheneOS logo pops up and now you are back on the lock screen of the main profile.
second profile suddenly changes to main profile
It happened again, I was entering my password when suddenly the screen went black followed by the graphene os logo, and then back to the lock screen
Based on your description it sounds like your phone is randomly restarting. I don't know of anyone else who has reported this problem, so it might be isolated to your phone.
If so, we can try to figure out whether it's a software or hardware problem. You can try factory resetting your phone to see if it's a software problem. Sorry, I know it's annoying to factory reset...
If after a factory reset your phone still restarts randomly, it's very likely there's some hardware issue causing the random restarts. Could be a faulty battery or something. If that's the case, you would probably want to see if it can be checked out by Google. You never said what model phone you're using, but if you're still having issues, I hope you can have it checked out while it's under warranty.