Cypress – There was an error reconnecting to the Chrome DevTools protocol

I’m running a controlled test in cypress and after some tests, this error is randomly occurring in the electron browser:

There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.

enter image description here

in google chrome it is running without errors, but in electron it is breaking.
I need to run in electron because of settings in aws