Hi there,
In the past the choice of font has caused some mouse movement problems in RStudio, see:
https://forum.posit.co/t/wrong-cursor-position-in-rstudio/23540
Try changing the font to Lucida console
in the menu Tools>Global Options>Appearance and see if that fixes it.
You could also try updating to the latest version of RStudio 1.2.5033
HTH