If Xi’an’s population carrying capacity were on par with Beijing’s, then who knows? But even so, Xi’an still seems too closed off, and in the end it probably wouldn’t be as well-rounded as Beijing.
I think the terrain around Beijing, China, is really unique—it’s practically perfect as a capital.
To the east, it’s guarded by two wedge-shaped peninsulas, so it would be almost impossible for foreign navies to get into the Bohai Sea.
To the south lies the vast North China Plain. An attack from the south would almost never succeed; in history, only the Ming dynasty pulled it off once, and even then there were some very unusual reasons behind it.