When I change direction the mouse goes in the opposite direction

I have a superlight 2 and today something happened to me that had never happened and I have not heard of anyone else who has ever had this problem, I noticed that by making small movements on the screen by moving right and left the arrow about half a centimeter when I changed direction for example from left to right while moving the mouse to the right the arrow continued to go to the left for about 2mm and then go in the right direction, its like the movement of the mouse and the arrow were not synchronized and the arrow moved late, I tried to change dpi, sensor settings, polling rate but nothing, the only thing that fix this was connecting the mouse to the usb to charge it and disconnecting it after 30 seconds (the battery was at 70%). Does anyone know what causes this bug?