I am not sure why you set a timeout on the unattended run to 15 minutes. If it runs fine, you should just let it run to the end. The unattended runs use a service account to run the flows and it's not the same as the user account that you would use for attended runs. Also, when the unattended run terminates due to a timeout, the session will still be closed, so, if it successfully started (indicating the user is not logged in at the time), the attended flow will still fail.
I would suggest putting your flows into Scope blocks, as that allows better handling. At this point you're just handing the error on the Set variable action. But the Set variable action will not even run if the first desktop flow fails. If you put it into a Scope, you can make the next action run on any error inside the scope. See this article for using scopes to handle errors in PA: https://dev.to/wyattdave/exception-handling-in-power-automate-4c4h
I think what you need is simply to run the unattended flow without the timeout and only run it in attended mode if unattended mode fails (indicating there is a user session active), if you really need it to be able to run both when a session is active AND when it's not.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.