Hi,
First off, looks like you already have a solution, use Secure Client 5.1.12.146; in general it's not recommended to always upgrade to the latest version as it's most probably not the greatest, unless you have a strict internal policy / requirement to do so.
If I understood your problem correctly, and it happens that you're using certificate based authentication, this challenge should show up in both versions of Secure Client. Search for "macOS keychain" in the Release Notes and find your solution:
https://www.cisco.com/c/en/us/td/docs/security/vpn_client/anyconnect/Cisco-Secure-Client-5/release/notes/release-notes-cisco-secure-client-5-1.html#reference_vms_wnb_k1b
Thanks,
Cristian.