Application not launching with restore previous session enabled in Desktop settings

I am working on a QT application in which the expected behaviour is whenever the user logout and then logins again the application should automatically launch itself again. This works as expected when in Settings → Desktop Session → When logging in → Start with empty session is selected. But when this settings is changed from Start with empty session to Restore previous saved session, the application does not launch up after logout and login back again. Even launching the application manually does not work. Running the command systemctl --user status shows Active: inactive (dead) . The only workaround I have found so far is to kill the application and launch it back again. But it changes the pid of the application and hence does not satisfy the Restore previous saved session settings. So can someone suggest me how to fix the problem so that I can run the application in Restore previous saved session settings without having to kill it.

Has someone seen this issue, as we are able to repro it consistently on KUbuntu 22/20.04.
This is impacting one of our customers.

@Brijesh_Singh can you tell me how to reproduce this? Which application causes this, Xorg or Wayland etc…

I am facing this issue on zoom application, its also seen on other non system default applications as well

Steps to reproduce:

  1. Go to Settings → Desktop Session → When logging in → Restore previous saved session . Make sure Restore previous saved session is selected

  2. Open any non system application (zoom in my case)

  3. Logout of the system

  4. Relogin

According to the Settings done in step 1. , Zoom application should have launched after relogin as the session gets saved before logout but it does not . Other applications like firefox, terminal work as expected.

Wayland has broken restore session management because the current working solution is based on X Session Management Protocol, hope it gets fixed with some magical trick on Plasma 6.