[5.0] Fixed Route Scanner On Windows

This PR fixes the #5997 issue about broken annotations scanner on Windows systems.