Mixed DPI setup causes custom window decorations to "pixelate"

Hi, I just got myself a 1440p monitor and Plasma 6 automatically set it up with 125% scale. I’m using it alongside a standard 1080p monitor as a secondary display. However I noticed that with the custom theme I’m using the window decorations and titles looked like they were not scaled correctly:

However, when I turn off my second monitor, it would scale normally. This only happens when my second monitor is enabled.

Any way to fix this while keeping both monitors on? The only workaround I’ve found so far is to have both monitors match DPIs. Using Breeze decorations also works, but I want to keep using the current theme.

I’m on Fedora 40 KDE. My GPU is Nvidia RTX 3070, if it’s relevant.