If you don't want to download third-party files, you can manually force the game to run on a single CPU core, which is often the cause of the glitch. Launch GTA San Andreas and out of the game.

Return to the game. You may need to repeat this every time you launch the game unless you create a custom batch file to automate it.

If the mouse stops working suddenly while playing, try these quick steps: I'm having trouble with san andreas and my mouse. : r/GTA