I am glad to read that the issue has not occurred again, at least not yet, with the 60s pause. I do very much believe that the loss of data you experienced had to do with the asynchronous data saving calls being interrupted, as mentioned earlier.
I have now reviewed the plugin situation. Alas, I don’t think there is much I can do: jsPsych does not have a callback mechanism I could use to tell it to wait for data to be saved (incidentally, I believe that also applies to their own approach to saving data), and synchronous communications are either strongly discouraged or deprecated in modern browsers (the Beacon API would sort of help but is not powerful enough for our purpose).
What I would suggest you do is either:
(a) introduce a pause, as mentioned already, or
(b) save data from your first experiment to the local or session storage on the browser, and read them from there, in the second experiment. You can read all about it here: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
The first option is of course slightly inconvenient for the participants and does not guarantee that the data will be saved. Consequently, I would recommend you use the second one. How does that sound?
Alain