Attach window UI Element selector in unattended bot

I am getting error of Ui Element selector in unattended bot when screen is not visible. But when screen is visible with unattended bot don’t give error.

Why this is happening ?