There are two problems. The first is the visible delay between the instance typing stops and the cursor moves, the second is that instance where the cursor appears above the text.
Optimisation of response times is quite a nightmare and will often require extensive tests to be carried on users to reach any conclusion. You can read up on what the Nielson Group had to say about this here: https://www.nngroup.com/articles/response-times-3-important-limits/
With animation enabled: Cursor movement is very smooth and is a delight to look at. However as one types too fast it creates the illusion that the system is slow to respond due to the cursor somehow lagging behind resulting in an ugly scenario where it appears over the typed text briefly. This could present a huge problem for the user typing large volumes of text.
With animation disabled: Cursor motion is brisk and quite retro really. But it works. No apparent system lag. Its efficient.
.
Solution A: Improve the animation-time of the cursor
This could be achieved by compromising on the smoothness of the animation curve to make it more linear. This will help shorten the animation duration. Shorter animation duration means less distance to compensate for. This will make it look better as the the cursor will APPEAR stay ahead of the last letter typed.
Current animation curve:

Proposed animation curve:
.
Solution B: Add a fade-out and fade-in effect
In this instance, whenever the system detects that the typing speed is way too fast for the cursor to keep up, it can smoothly animate the visibility of the cursor. The system can slightly blur or fade out the cursor whenever typing is too fast , then remove the blur and restore full opacity as it corrects the position.
Current appearance of text when typing is too fast:

Proposed solution when typing is too fast:

I have not tested out these solutions, so my recommendations may work in theory but fail out in the wild, but I believe they are worth a try.