Crash on closing some Flatpak app?

Hi everyone!
I want to file this bug, but it seems I can’t gather enough information to actually file it.
What I’m experiencing is some Flatpak application causing Kwin to crash when I close them (either via their title bar buttons or via keyboard shortcuts). When this crash happens, lots of the open apps crash too: for example, Firefox crashes too and is the only app which then sends a warning (something along the lines “Firefox crashed without explanation”), but this doesn’t happen when I close Firefox! Other applications don’t get closed, for example Dolphin and Konsole stay open.
The issue appears when, for example, I close Chrome or Steam. It doesn’t happen when I close Whatsie, which is Flatpak too.

I’m on Plasma 6.0 and I never experienced it before reinstalling the system with this last version. I cannot see to do a screen capture, as when I do this problem goes away.

How could I retrieve useful information to file a bug?

Tried disabling Kwin scripts, it turns out that a script was causing this inappropriate behaviour, so it will be tracked there.