No such window Exception

@here… I am automating desktop application using bot tasks. When first task run, login is performed and one window gets opened. I have used ‘close-on-completion=“false”’ attribute to keep this window open for further use. When second script runs and new session is created, this window is getting closed automatically and no such window found exception is thrown.
I want this window to perform further operation. Any help? Do I need to work on sessions?
Thanks in advance