This usually happens when two different logins are connected for the same broker. Each broker only allows one unique login and password to stay connected at a time. If more than one login is connected, they will conflict and cause repeated disconnections.
To fix this, go to your Profile Settings and review your connected broker accounts. Delete one of the broker connections so only a single login remains. This will stop the disconnecting issue.