New tabs are closed after current script had finished

I’ve opened a new tab using windows.open() method using Oxygen’s web.execute() method.
After performing a few operations on this tab, the tab was dismissed.

e.g:
web.init()
web.open(‘website1’)
web.execute(()=>{
window.open(‘website2’)
});
web.selectWindow(‘title=website2 title’);
web.something()
web.something()
web.something()

after the third web.something() - the tab of website 2 closes…