Select back to the browser after executed Xclick

Hello, I’m using looping with normal command (select, storeAttribute, click) to read a tab in chrome browser, but then I used XClick to store data from browser to another windows, after that I expect the query will select back the browser to work but that doesn’t work. even I XClick on browser but nothing works
Can you guys please lead me out of this problem? how to select back to work on browser after executed XClick on another windows

{
“Name”: “zizu”,
“CreationDate”: “2021-4-4”,
“Commands”: [
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!errorIgnore”
},
{
“Command”: “store”,
“Target”: “medium”,
“Value”: “!replayspeed”
},
{
“Command”: “comment”,
“Target”: “open // https://ok.ru/profile/video/”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=open”,
“Value”: “https://ok.ru/profile/video/
},
{
“Command”: “store”,
“Target”: “1”,
“Value”: “rowno”
},
{
“Command”: “comment”,
“Target”: “selectWindow // TAB=open”,
“Value”: “https://sovid.net/
},
{
“Command”: “csvReadArray”,
“Target”: “saved-video.csv”,
“Value”: “arr”
},
{
“Command”: “times”,
“Target”: “{!CsvReadMaxRow}", "Value": "" }, { "Command": "executeScript_Sandbox", "Target": "return {!times} - 1;”,
“Value”: “i”
},
{
“Command”: “store”,
“Target”: “{arr[{i}][0]}”,
“Value”: “lastone”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=1”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//div[@id=‘footer’]”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//div[@id=‘footer’]”,
“Value”: “”
},
{
“Command”: “do”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=1”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “false”,
“Value”: “movielink”
},
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!statusOK”
},
{
“Command”: “verifyElementPresent”,
“Target”: “xpath=//[@id=“hook_Loader_FriendVideoMoviesRedesignRBlockLoader”]/div[1]/div[{rowno}]/div[1]/div[1]/a[1]", "Value": "" }, { "Command": "if_v2", "Target": "{!statusOK}",
“Value”: “”
},
{
“Command”: “storeAttribute”,
“Target”: "xpath=//
[@id=“hook_Loader_FriendVideoMoviesRedesignRBlockLoader”]/div[1]/div[1]/div[1]/div[1]/a[1]@href”,
“Value”: “movielink”
},
{
“Command”: “store”,
“Target”: “https://ok.ru${movielink}”,
“Value”: “!clipboard”
},
{
“Command”: “if_v2”,
“Target”: “{lastone} != {movielink}”,
“Value”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return {arr[0]}.length;", "Value": "col" }, { "Command": "if_v2", "Target": "{arr[{i}][0]} == {movielink}”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “Row {!times} is already done, skipping it.", "Value": "green" }, { "Command": "else", "Target": "", "Value": "" }, { "Command": "comment", "Target": "selectWindow // TAB=2", "Value": "" }, { "Command": "XClick", "Target": "mgskdv_dpi_96.png", "Value": "" }, { "Command": "pause", "Target": "2000", "Value": "" }, { "Command": "XClick", "Target": "m9j95w_dpi_96.png", "Value": "" }, { "Command": "pause", "Target": "2000", "Value": "" }, { "Command": "XClick", "Target": "qdpms3_dpi_96.png", "Value": "" }, { "Command": "pause", "Target": "2000", "Value": "" }, { "Command": "XClick", "Target": "wnkha1_dpi_96.png", "Value": "" }, { "Command": "store", "Target": "true", "Value": "!statusOK" }, { "Command": "if_v2", "Target": "{rowno}==1”,
“Value”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var b = {arr}; b[{i}][0] = {movielink}; return b; ", "Value": "arr" }, { "Command": "csvSaveArray", "Target": "arr", "Value": "saved-video.csv" }, { "Command": "end", "Target": "", "Value": "" }, { "Command": "end", "Target": "", "Value": "" }, { "Command": "end", "Target": "", "Value": "" }, { "Command": "end", "Target": "", "Value": "" }, { "Command": "executeScript_Sandbox", "Target": "return Number({rowno})+1”,
“Value”: “rowno”
},
{
“Command”: “repeatIf”,
“Target”: “{lastone} != {movielink} && ${movielink} != false”,
“Value”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=1”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=CLOSE”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=2”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=0”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=CLOSE”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=CLOSE”,
“Value”: “”
}
]
}

What is the work to be done with this code, it seems to me too long a code. What should you do?
Is it a simple video grabber?