SYSTEM_THREAD(ENABLED) is key is keeping your application thread running whilst the system thread is trying to re-establish a cloud connection. You have to be careful in your application to not call blocking activities and therefore to check Particle.connected() before Particle.publish(). If loss of connection is a regular feature of operation and you don’t want to lose important data then you will need to investigate and implement an event send buffer. There is a discussion topic if you search for it about a ‘recommended template’ for the application, a tutorial and send queue functions written by @rickkas7.
Another way to simulate loss of connection/out of signal range is to keep your antenna connected but put it inside a faraday cage - a grounded conductive container!