The Swiss bank’s risk chief is leaving after it revealed the fallout from two major clients.