“So that they do not teach you to commit any of the abominations” (Dt.20:18)—
this teaches that
if they become penitents, they are not to be killed.
“So that you sin against HASHEM your God” (Dt.20:18)—
if you haven’t performed all that is stated here,
you shall be called sinners against HASHEM your God.