I've looked into the issue further. The reason is that I created a theme with rounded corners and automatically picked the borders from the titlebar image, so the end of the borders have been cut off. So i was able to solve the (bottom) border like that.
However the top can't seem to be fixed without going to a rectangular theme. Also the area where the titlebar would be in the UWP apps uses the accent color instead of the color I defined in curtains (hence the top here is turqoise (my accent color) and the bottom is blue (layer image from the titlebar in curtains).
It seems like rounded corners are bugged in general or just not possible without deficits in curtains right now, I'm having issues combined with groupy too, please look at the attached photo. Is it possible to make Groupy respect the transparent edge of the titlebar so it doesn't look off?