Making a mistake in the second if onwards

The macro only solves the first if correctly, it solves the next if incorrectly, what should I do?

Add macro code and add more information about the problem

{
“Name”: “VM_BASE”,
“CreationDate”: “2023-5-27”,
“Commands”: [
{
“Command”: “store”,
“Target”: “true”,
“Value”: “!errorignore”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “2”,
“Value”: “!timeout_wait”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “FAST”,
“Value”: “!REPLAYSPEED”,
“Description”: “”
},
{
“Command”: “label”,
“Target”: “STARTED”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “refresh”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “10000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForPageToLoad”,
“Target”: “”,
“Value”: “10000”,
“Description”: “”
},
{
“Command”: “verifyElementPresent”,
“Target”: “xpath=//[@class="tab-content"]",
“Value”: “”,
“Description”: “”
},
{
“Command”: “if”,
“Target”: “${!statusOK} == true”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: “StartCheck”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: “Captcha”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “label”,
“Target”: “Captcha”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=OPEN”,
“Value”: “https:google.com”,
“Description”: “”
},
{
“Command”: “waitForPageToLoad”,
“Target”: “https:google.com”,
“Value”: “10000”,
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=CLOSEALLOTHER”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “waitForElementVisible”,
“Target”: "xpath=//
[@class="antigate_solver image solved"]”,
“Value”: “60000”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="sBtn"]",
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: "click // xpath=//
[@id="lBtn"]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “verifyElementPresent”,
“Target”: “xpath=//[@id="Submit"]",
“Value”: “”,
“Description”: “”
},
{
“Command”: “if”,
“Target”: “${!statusOK} == true”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id="Submit"]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: “StartCheck”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: “Captcha”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},

If it solves correctly first, but if it just goes to else
Now, if I say start the macro from the second case, it will solve it correctly

The problem I have is that every variable is not defined and it is possible with an error, I also use variable {!statusOK} if does not work correctly, it seems that the variable is filled in the first if and the next if works incorrectly, there is a way There is no variable before the loop to clear?
@admin

Problem solved, my code was wrong