Charged-hadron suppression in Pb plus Pb and Xe plus Xe collisions measured with the ATLAS detector