DUE serial communication data slippage.

Hi, I am sending 0-23999 to PC using following code.

void setup()
{

Serial.begin(250000);
}

void loop() {
for (int i=0;i<=23999;i++)
{

Serial.println(i);

}

delay(10000); // wait for 10 second
}

code work well. but i am facing issue is that.

When i open serial monitor of arduino all data comes line by line. but when i access com port using python or in visual studio the data after 5000 is not in order some of bits overlapped or missing.

Why this happens i am not able to understand.

anyone faced same problem?

baud rate is set 250000 both sides. (Arduino and PC).

TIA