Top panel of the window stops scaling, starts stretching/squeezing instead

At random points, top panel of the windows stops scaling, starts stretching/squeezing instead when you change window width. Only the visual part changes, while buttons remain at the correct positions, so graphics no longer match actual button locations. Close/minimise/maximise buttons remain usable, you just have to guess their position.

Changing to a different decorations theme, even if you then select the one you were just on again resets the scaling, but then the bug repeats again and again.

At least one user already filed a bugreport with the description of the same bug, with a screenshot of how it looks:
https://bugs.kde.org/show_bug.cgi?id=421326

System:    Host: ghost Kernel: 5.6.11-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: KDE Plasma 5.18.5 
           Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: MSI model: 990FXA-GD65 (MS-7640) v: 3.0 serial: <filter> BIOS: American Megatrends v: 20.2 
           date: 04/12/2013 
CPU:       Topology: 8-Core model: AMD FX-8370 bits: 64 type: MCP arch: Bulldozer L2 cache: 2048 KiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 64036 
           Speed: 3987 MHz min/max: 1400/4000 MHz Core speeds (MHz): 1: 3987 2: 4052 3: 3585 4: 3628 5: 2712 6: 1832 7: 3886 
           8: 3990 
Graphics:  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] driver: nvidia v: 435.21 bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.8 driver: nvidia tty: N/A 
           OpenGL: renderer: GeForce RTX 2070 SUPER/PCIe/SSE2 v: 4.6.0 NVIDIA 435.21 direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] SBx00 Azalia vendor: Micro-Star MSI driver: snd_hda_intel v: kernel 
           bus ID: 00:14.2 
           Device-2: NVIDIA TU104 HD Audio driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Device-3: GYROCOM C&C DigiHug USB Audio type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 9-5:5 
           Sound Server: ALSA v: k5.6.11-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI driver: r8169 v: kernel 
           port: d000 bus ID: 02:00.0 
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 11.62 TiB used: 6.44 TiB (55.4%) 
           ID-1: /dev/sda vendor: Seagate model: ST8000DM0004-1ZC11G size: 7.28 TiB 
           ID-2: /dev/sdb vendor: Crucial model: CT2000MX500SSD1 size: 1.82 TiB 
           ID-3: /dev/sdc vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB 
           ID-4: /dev/sdd vendor: Samsung model: SSD 840 EVO 250GB size: 232.89 GiB 
           ID-5: /dev/sde vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB 
           ID-6: /dev/sdf vendor: Crucial model: CT525MX300SSD1 size: 489.05 GiB 
Partition: ID-1: / size: 39.12 GiB used: 27.42 GiB (70.1%) fs: ext4 dev: /dev/sde1 
           ID-2: /home size: 767.09 GiB used: 667.15 GiB (87.0%) fs: ext4 dev: /dev/sde2 
           ID-3: swap-1 size: 18.00 GiB used: 10.92 GiB (60.7%) fs: swap dev: /dev/sde3 
Sensors:   System Temperatures: cpu: 55.0 C mobo: N/A gpu: nvidia temp: 36 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 26% 
Info:      Processes: 1681 Uptime: 9d 10h 20m Memory: 15.59 GiB used: 11.52 GiB (73.9%) Init: systemd Compilers: gcc: 9.3.0 
           Shell: bash v: 5.0.16 inxi: 3.0.37 

Forum kindly sponsored by