To smoothly synchronize the players’ positions, I created state buffers with history. But at the moment with sync states, I got stuck - unreliable UDP packets on my localhost somehow dropped too much (from an update frequency of 20 Hz it turns out to be 1-2 Hz), I had to test for several days.
But in the end, I solved the main synchronization problems and created a layer for transferring character states in one area of the world.