Gdk-Message: Error 71 (Protocol error) dispatching to Wayland display

My mistake. I was getting the same error message but it was for Flatpak apps using the GNOME 47 runtime. I’m on F40 with KDE Plasma, and my laptop is an AMD + Nvidia system. The above workarounds do work for me, but are imperfect on displays using fractional scaling. I hope this issue gets solved soon.