Fixed the issue of cursor loss caused by screen switching during program initialization or cursor replacement.