It happens arbitrarily, like once every 3 or 4 refreshes, the server just disconnects with this message in the console:
The development server has disconnected.
Refresh the page if necessary.
I looked at one of the other SO posts and my problem seems different because that's about the webpack watcher not connecting, to begin with, in my case it works but disconnects very often. I haven't even ejected the app so not sure why this can be.