Destroying a connection clears the secrets from settings
In g-c-c, a temporary connection is used to check whether the secrets are valid. When this temporary connection is destroyed, the password is lost unless the settings are detached from the connection first (yes, the same settings object is used for multiple connections).
This seems like a bit of an unintended side effect. i.e. why should the secrets be cleared before the settings object itself is destroyed?
Unless we just want to be paranoid and protect e.g. from the API user accidentally leaking the settings object.
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1099