This might sound strange but could you utilize Sign-In without having the device in Shared Device mode?
Reason for me asking this is that Shared Device mode causes really unstable experience where devices sign-out randomly.
If we can skip Shared Device mode and when the user Signs out it clears the cache etc and when signed-in it fetches the policies assigned to that user. Have ran Shared device mode for over 1 years now and same issues accross multiple sites are reported, random sign-outs and when this happens it will sign the user out of Edge, Teams.
If we dont use Shared Device mode, then the user is not randomly signed out.
If we use shared device mode and run Chrome without SSO then they will not be signed out so this is currently the fail safe as they stay signed in to the browser but signed out of Teams etc.