Now that the support for plasma 6 is ready, I have opened a suggestion for KWin to include this effect in their project: Suggestion to include the KDE-Rounded-Corners as a part of KWin (#198) · Issues · Plasma / KWin · GitLab
You can find the repo here: GitHub - matinlotfali/KDE-Rounded-Corners: Rounds the corners of your windows in KDE Plasma 5 and 6