Even one who is punished by Beis Din must do Teshuvah. This is borne out by two Mishnayos; the translations that follow are from Sefaria.
Sanhedrin 6:2:
הָיָה רָחוֹק מִבֵּית הַסְּקִילָה כְּעֶשֶׂר אַמּוֹת, אוֹמְרִים לוֹ הִתְוַדֵּה, שֶׁכֵּן דֶּרֶךְ הַמּוּמָתִין מִתְוַדִּין, שֶׁכָּל הַמִּתְוַדֶּה יֶשׁ לוֹ חֵלֶק לָעוֹלָם הַבָּא. שֶׁכֵּן מָצִינוּ בְעָכָן שֶׁאָמַר לוֹ יְהוֹשֻׁעַ, בְּנִי שִׂים נָא כָבוֹד לַה' אֱלֹהֵי יִשְׂרָאֵל וְתֶן לוֹ תוֹדָה וְגוֹ' וַיַּעַן עָכָן אֶת יְהוֹשֻׁעַ וַיֹּאמַר אָמְנָה אָנֹכִי חָטָאתִי לַה' אֱלֹהֵי יִשְׂרָאֵל וְכָזֹאת וְגוֹ' (יהושע ז). וּמִנַּיִן שֶׁכִּפֶּר לוֹ וִדּוּיוֹ, שֶׁנֶּאֱמַר (שם) וַיֹּאמֶר יְהוֹשֻׁעַ מֶה עֲכַרְתָּנוּ יַעְכָּרְךָ ה' בַּיּוֹם הַזֶּה. הַיּוֹם הַזֶּה אַתָּה עָכוּר, וְאִי אַתָּה עָכוּר לָעוֹלָם הַבָּא. וְאִם אֵינוֹ יוֹדֵעַ לְהִתְוַדּוֹת, אוֹמְרִים לוֹ, אֱמֹר תְּהֵא מִיתָתִי כַפָּרָה עַל כָּל עֲוֹנוֹתָי.
[Once the accused] was about ten cubit from the stoning area, they say to him, "Confess," for such is the way of those sentenced to death to confess, for all who confess have a share in the World to Come. For thus we find with respect to Achan, to whom Joshua said, (Joshua 7:19) "'My son, give, I pray thee, glory to the LORD, the God of Israel, and make confession unto Him.'... And Achan answered Joshua, and said: 'Of a truth I have sinned against the LORD, the God of Israel.'" And from where [do we know] that his confession atoned for him? As it says, (Joshua 7:25), "And Joshua said: 'Why hast thou troubled us? the Lord shall trouble thee this day,'" today you are troubled, but you are not troubled in the World to Come. And if he does not know how to confess, they say to him: "Say, 'May my death serve as an atonement for all my iniquities.'"
We see from here that even though he is being led out to be killed, he still must do Teshuvah on top of that.
Similarly, Yoma 8:9:
עֲבֵרוֹת שֶׁבֵּין אָדָם לַמָּקוֹם, יוֹם הַכִּפּוּרִים מְכַפֵּר. עֲבֵרוֹת שֶׁבֵּין אָדָם לַחֲבֵרוֹ, אֵין יוֹם הַכִּפּוּרִים מְכַפֵּר, עַד שֶׁיְּרַצֶּה אֶת חֲבֵרוֹ. אֶת זוֹ דָּרַשׁ רַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה, מִכֹּל חַטֹּאתֵיכֶם לִפְנֵי יְיָ תִּטְהָרוּ (ויקרא טז), עֲבֵרוֹת שֶׁבֵּין אָדָם לַמָּקוֹם, יוֹם הַכִּפּוּרִים מְכַפֵּר. עֲבֵרוֹת שֶׁבֵּין אָדָם לַחֲבֵרוֹ, אֵין יוֹם הַכִּפּוּרִים מְכַפֵּר, עַד שֶׁיְּרַצֶּה אֶת חֲבֵרוֹ.
Yom Kippur atones for transgressions between a person and God, but for a transgression against one's neighbor, Yom Kipur cannot atone, until he appeases his neighbor. Thus R. Eleazar ben Azariah expounds the text, "From all your sins before the Lord shall ye be clean": For transgressions between a person and God, Yom Kippur atones, for transgressions against one's neighbor, Yom Kippur cannot atone, until he appeases his neighbor.
These sources are codified by the Rambam in Hilchos Teshuvah 1:1 (translation is my own):
וְכֵן כָּל מְחֻיְּבֵי מִיתוֹת בֵּית דִּין וּמְחֻיְּבֵי מַלְקוֹת אֵין מִתְכַּפֵּר לָהֶן בְּמִיתָתָן אוֹ בִּלְקִיָּתָן עַד שֶׁיַּעֲשׂוּ תְּשׁוּבָה וְיִתְוַדּוּ. וְכֵן הַחוֹבֵל בַּחֲבֵרוֹ וְהַמַּזִּיק מָמוֹנוֹ אַף עַל פִּי שֶׁשִּׁלֵּם לוֹ מַה שֶּׁהוּא חַיָּב לוֹ אֵינוֹ מִתְכַּפֵּר עַד שֶׁיִּתְוַדֶּה וְיָשׁוּב מִלַּעֲשׂוֹת כָּזֶה לְעוֹלָם שֶׁנֶּאֱמַר (במדבר ה ו) "מִכָּל חַטֹּאת הָאָדָם":
And likewise, all those liable to death by the courts or those liable to lashes - they are not atoned for in their deaths or in their lashes until they do Teshuvah and Vidui. And likewise, one who wounds his friend and one who damages his money, even though he pays him that which he owes him, he is not atoned for until he does Vidui and returns from doing like this again, as it says (Bamidbar 5:6 [in the context of Vidui]): “from all the sins of man.” [Regardless of the sin, he must do Vidui.]