Beijing is also very safe through, since after China permanently and stably incorporated Manchuria. An attack on Beijing needs to pass over so many air defenses that it would be nearly impossible. Sure Xian is so well defended that it's functionally on another continent and only hittable with ICBM as far as US would be concerned, but Beijing isn't that much further behind.
It even makes sense from a nuclear defense perspective. If we go with US, we both get annihilated, that is something China has accepted will happen for likely the next 30 years at least. So the capital's position is of no concern in the US scenario. However, China today can almost guaranteed destroy minor nuclear powers like India (or Israel, although there is no scenario Israel would actually try) with 0 or very minor return fire getting through. Against these countries, Beijing is positioned the furthest away possible.