> do you think it's because of the packets loss % or something else can cause that ?
Potentially, but I think a network capture on both victims would surely explain it. At some point you might be even getting some asymmetric traffic: packets from A to B go through you, but from B to A don't, until the ARP cache is poisoned again.
I'm not a coder (or a shitty one :)), so I can't infer from your code things like how often do you renew your poisoning.