A. Ensure your device's software is up to date. Go to Settings > System > Software Update and check for updates. This can fix bugs that cause cursor issues.
B. Try using a different keyboard app. Download a third-party keyboard from the Google Play Store and set it as your default keyboard to see if the issue persists.