LibreOffice does not scale properly in KDE Plasma 6 if the system has 2 monitors with different scale factors

Hi everyone, I have no idea if this is a Plasma problem or a LibreOffice problem, but the issue is as following:

My system has two monitors connected. One is a HiDPI display at 200% scaling and the other is a regular display at 100% scaling.

In this configuration, LibreOffice (any application of the LibreOffice suite) does not scale properly. The main menu looks mostly OK, but everything else (icons, drop downs, etc.) is rendered at 100% scale. Basically, the apps are completely unusable.

This is what is looks like:

If I unplug the monitor which is set to 100% scaling, LibreOffice magically starts working properly again.

On one hand, it sounds like a LibreOffice issue… On the other hand, I checked in GNOME on the same computer, and it works perfectly there, so maybe it’s a Plasma issue after all?

I must also add that in Plasma 6.0.x this issue only showed up after waking the computer from sleep, rebooting the system always fixed it. In Plasma 6.1.0, LibreOffice is always displayed incorrectly, and rebooting the system no longer fixes the scaling.

I am running openSUSE Tumbleweed (in case it makes any difference), Plasma 6.1.0, Qt 6.7.2, LibreOffice 24.2.4.2 (VCL: kf6, cairo+wayland)

This is indeed a LibreOffice bug:

https://bugs.documentfoundation.org/show_bug.cgi?id=141578

For the time being, it is possible to run LO with the following command:

WAYLAND_DISPLAY= /usr/bin/libreoffice

This workaround forces LibreOffice to use XWayland which circumvents the issue (the bug is Wayland-specific).