KDE restarts when TV is turned on

I have a TV as a second screen on my system which isn’t always turned on. If I turn it on while the system is running KDE restarts meaning every window that was opened is closed. I’m using Wayland to be able to scale the TV to 150% independently. Is there a way to prevent this from happening?

I switched to X11 because certain applications lack Wayland support. Now the windows stay opened when I turn on the TV but the panel disappears. I guess I shouldn’t be using KDE with such a setup.

Edit: I can add a panel but it doesn’t show it either for that session. The only thing I can do is restart sddm which then shows me both panels.