Supposedly Gnome is better but I have no idea.
EDIT: I also found this looking through github issues. It's not only a know issue, it's a WONTFIX:
>> This also brings up a good point. If sway detects that swaylock (or whatever locking process is used) didn't exit cleanly, it should try and recreate it, so we don't just end up giving the a malicious user access to the session.
> I don't think this is worth it
https://github.com/swaywm/sway/issues/2031#issuecomment-3920...