TT #637 · Parashas Ki Seitzei · Seventh Aliyah · Passuk 25:03
Forty times he shall strike him; he shall not add, lest he continue to strike him beyond these with a great blow, and your brother be degraded before your eyes.
Torah Temimah points to Makkot 23a.
TT lemma: וְנִקְלָה אָחִיךָ.
English: ‘And your brother be degraded’ – all who are liable to karet and receive lashes are exempted from their karet, as it is stated ‘and your brother be degraded’ – once he has been flogged, behold he is your brother.
Derash of restorative status after lashes (Bavli).
When a person liable to karet is flogged (and has repented), the lashes effect atonement and restore him to the status of ‘your brother,’ releasing him from the karet penalty.