Topics under ‘/losant’ are restricted to topics that are named in very specific ways - they have meaning for the Losant platform. In your case, it sounds like what you actually want to be publishing to is ‘/losant/your_losant_device_id/state’, but instead you are using your device name. You can also freely publish on any topic that does not start with ‘/losant’. You can read more about how Losant uses MQTT topics here.
Because MQTT has very little in the way of returning errors to clients, when a client publishes to a topic that is not permitted, the only thing the MQTT broker can do is disconnect the client - which, since you are publishing to an invalid topic, is the source of your frequent connections and disconnections. Once you start publishing to the correct topics, you connection should become more stable.
Hope that helps!