Plasma sometimes breaks when playing Minecraft

I am using KDE Neon (X11) with an NVIDIA RTX 3060. And I’ve been encountering a weird bug where sometimes when I play Minecraft, Plasma kinda just breaks. Window decorations disappear, closing an application doesn’t really work, and the whole system is in a buggy state. I don’t know why this happens, I believe closing Firefox helps as I haven’t had this happen to me while Firefox is closed. This is all just a guess though. Does anyone know what could be causing this?

System Specs (From “About This System”):

Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.9
Kernel Version: 5.19.0-43-generic (64-bit)
Graphics Platform: X11
Processors: 16 × 13th Gen Intel® Core™ i5-13400
Memory: 15.4 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B760M DS3H AX DDR4

journald and xorg logs would be useful.

Where do I get those?

See man journalctl or systemd/Journal - ArchWiki

From your description, it sound like kwin_x11 has crashed. I’d recommend that you get a symbolicated backtrace of the crash and submit a bug report. See Guidelines and HOWTOs/Debugging/How to create useful crash reports - KDE Community Wiki and Get Involved/Issue Reporting - KDE Community Wiki

Consider downgrading your Nvidia driver to 510. (I had the exact same thing with GW2 & my Gtx 1060, the same odd system crash you describe. Since downgrading & increasing swap size I’ve not had it occur.

510+ versions have a gmemory leak and that only have been fixed in the 535 beta, but that one has completely crashed my entire system, so 510 it is.