Flattener vs. Random
Remember there is more than one wave in the air, typically. So even if your random movement is completely random, once you layer a few different waves on top of each other, the first wave constrains the second wave which causes a more predictable profile. What flattening does that random movement doesn't is put that extra effort in to reach the further angles, effectively lowering the peak hit probability. You also have access to bullet shadows, letting you reduce your accumulated hit probability even further.
The implementation differences cause the internal state to diverge so rapidly that I don't think this is really possible to exploit. Certainly I've tried, even looking at both sides of the state to see if I could make something that works, as have many others, in many weird and wonderful ways.
However even the best anti-surfer guns have lower hit rates against any surfer with flattening, than a relatively simple KNN gun gets against the best Random movements. So I would call this approach to guns impossible, and instead you just need to try to adapt as fast as possible for anti-surfing, and use different types of stats that they don't have, not try to simulate their dodging of their simulation of your gun. And for movement, use a flattener, and make your stats a little different from everyone else's flattener.