Can't fully logout from session: The X11 connection broke (error 1). Did the X11 server die?

When my wife logs out of her session, it seems to work but there is actually a ghost session left over. This then causes troubles when she later signs in again.

Mainly I see this: The X11 connection broke (error 1). Did the X11 server die?

This is the state of the session after logout.

loginctl show-status 899
899 - maria (1002)
           Since: Sun 2021-02-14 08:29:30 CET; 13h ago
          Leader: 466187
            Seat: seat0; vc2
         Display: :1
         Service: sddm; type x11; class user
         Desktop: KDE
           State: closing
            Unit: session-899.scope
                  ├─466703 /usr/bin/baloo_file
                  └─467495 /usr/lib/geoclue-2.0/demos/agent

Feb 14 22:16:33 ****** kwin_x11[466598]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 21632, resource id: 23068690, major code: 18 (ChangeProperty), minor code: 0
Feb 14 22:16:33 ****** sddm-helper[466187]: [PAM] Closing session
Feb 14 22:16:33 ****** sddm-helper[466187]: pam_unix(sddm:session): session closed for user maria
Feb 14 22:16:33 ****** sddm-helper[466187]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_close_session
Feb 14 22:16:33 ****** sddm-helper[466187]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Feb 14 22:16:33 ****** sddm-helper[466187]: [PAM] Ended.
Feb 14 22:16:33 ****** kded5[466555]: The X11 connection broke (error 1). Did the X11 server die?
Feb 14 22:16:33 ****** kwin_x11[466598]: The X11 connection broke (error 1). Did the X11 server die?
Feb 14 22:16:33 ****** kaccess[466709]: The X11 connection broke (error 1). Did the X11 server die?
Feb 14 22:16:33 ****** org_kde_powerdevil[467498]: The X11 connection broke (error 1). Did the X11 server die?