Seamless sessions might not log off gracefully and leave sessions to be active in Citrix Studio or Citrix Director when using Citrix Virtual Apps and Desktops 2212 or later (including Citrix Apps and Desktops 2402 LTSR).
Starting with Citrix Virtual Apps and Desktops 2212 the Windows startup applications are processed automatically for seamless sessions similarly to desktop sessions.
Windows startup applications as defined in the user's Run key, like Microsoft Onedrive or Microsoft Teams might prevent logoff of seamless applications.
Running "start ms-settings:startupapps" from a Published Command Prompt lets you see what are the startup programs configured for the launched session. The Autoruns tool from Microsoft Sysinternals, can show more detailed information to aid in identifying all system startup programs: https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns
If automatically starting these applications for Seamless sessions is not desired, removing these applications from automatically starting could solve log off issues for seamless applications.
When automatically starting these application is desired please refer to https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/manage-deployment/applications-manage#troubleshooting-session-sign-out-issues-with-published-applications for more information about troubleshooting session logoff issues.
Starting with Citrix Virtual Apps and Desktops 2212 the Windows startup applications are processed automatically for seamless sessions similarly to desktop sessions.