Draw2D working differently in Roku2 XS and Roku 3

Hi,
The below code results are different on a Roku2XS and Roku 3 when the sleep() is commented out.
Roku2 → I see only the poster screen.
Roku3 → I see poster screen and above that a blue rectangle.

When the sleep is enabled I see the same result as in Roku3.
Why is this happening??

sub main()
facade = CreateObject(“roPosterScreen”)
facade.Show()
screen = CreateObject(“roScreen”)
screen.drawRect(0,0,700,800,&ha03000FF) ’ red
'screen.finish()
screen = invalid

screen = CreateObject(“roScreen”)
sleep(2000)
screen.drawRect(0,0,700,1000,&h0022ddFF) ’ blue
screen.finish()
loop()
facade.close()

end sub

function loop()
while true
?“looop”
sleep(1000)

end while
end function

Thanks.