Difference behavior of sumo scenarios when triggered by python and cpp

I’m running the same sumo scenario with two different codes ; one is triggered by python and the other one by a C++ code. I wanted to compare the events from a reference scenario (python)and real scenario based on ns3 and C++. The problem is that by time the behavior of the vehicles changes: the speed of two vehicles with the same ID is changing and the position of the same vehicles at a specific timestamp is different between the two scenarios (PS: the vehicles are following the same trajectory because I m using the same routing file). Can you please suggest how to fix this problem and the origin of this gap?