Railway line seems broken

Compare these:
https://www.openstreetmap.org/#map=12/28.2696/104.1516
https://www.openstreetmap.org/#map=12/28.2696/104.1516&layers=T

Why?

Perhaps because there is no “service” tag for that section that indicates the purpose.
You can find more information about this tag on the wiki page for service