As I am also not familiar with Trinket, I do not know if the following is remotely relevant to what you are experiencing, but here goes:
In Glowscript, my students and I often modify code, but the code does not save. As far as I can determine, either the browser or Google is automatically logging the user out from the user account, but Glowscript does not signal this and still allows changes to the local page. These changes are not saved to the version on the user account, however. (At other times, the page locks and no changes can be made, even though the user still shows as being logged in.)
If I login each session newly (even if it appears that I am still logged into Glowscript -- so I logout and login again), it helps, but my students and I are sometimes logged out mid-session, as well.
The problem seems to be that Glowscript does not detect when a user is logged out of the account; if it flagged this, there would be less danger of losing work.
Harlan