A Debug.WriteLine can be slower then 1 millisecond. It isn't optimized for speed.
You could add a call placing the message to a list and then write the list to Debug.WriteLine after running.
You could add a background task sending the message to Debug.WriteLine.
Both should prevent the timer from missing ticks.
Another reason for missing ticks might be the OS or another program doing some work between two Debug.WriteLine calls. It might even be a slow machine.
Setting the Thread Priority or running this application on a Dedicated machine should help but these kind of timer issues are expected on Windows since it never said it was a Real Time OS.