What causes those cardiac problems is Azithromycin, not HCQ; that's a well known side effect of that drug, which is why some doctors are advocating alternative antibiotics, such as Doxycycline, which doesn't present that danger.
https://nypost.com/2020/04/04/long-island-doctor-tries-new-hydroxychloroquine-for-covid-19-patients/