Oh, maybe I misunderstood your post earlier. I thought it was doing the orange blinks during the handshake, and that the device wasn’t able to get online.
If you’re seeing blinks while the device is online, they would be red and not orange blinks. And they would be preceded by an SOS pattern. Is this what you’re seeing? -> https://docs.particle.io/guide/getting-started/modes/photon/#red-flash-sos
If you’re losing connectivity even while in safe mode, and you’re not seeing an SOS pattern, I’m guessing you’re having some kind of power loss or signal issue, that is causing corruption and the loss of the connection. Next steps would be to make sure your power supply is working well, and / or try to monitor traffic on your network, or transmit test data over something like a direct socket connection to see if things are being corrupted.