Mouse cursor keeps disappearing in R studio

I have downloaded R and Rstudio the latest versions respectively.

But whenever I am practicing writing some code in the R script section of the IDE in R studio after a few minutes the mouse cursor keeps disappearing and I can’t write anymore code. It’s very frustrating. Is there a problem in the program? I never used to have this problem with the old version of R studio.