Functionally this comes down to a DM's ruling or interpretation.
A literal or mechanical reading of the rule interaction would be something like:
Only if the target is on the astral plane or has traversed through the astral plane to another realm, so that a cord is present. Only if the entity has a body present on the material plane - And then only if they have a soul - or if separating the soul from the body would "Kill" the creature.
Arguably a lich - by definition of their phylactery - could survive having their soul separated from their body - but what happens to such a soul is unspecified.
But as described in Astral projection - the severing of the cord only separates the connection between the soul and the body, which results in an outright kill. Would an immortal deity or other such being have such a weakness? So again - it comes down to DM's interpretation.
For side-by-side reference:
Stats are in Mordenkainen's Tome of Foes:
MACIC ITEM: GREATER SILVER SWORD
Weapon (greatsword), legendary (requires attunement by a creature that
has psionic ability)
This magic weapon grants a +3 bonus to attack and damage rolls made
with it. While you hold the sword, you have advantage on Intelligence,
Wisdom, and Charisma saving throws , you are immune to being charmed,
and you have resistance to psychic damage. In addition, if you score a
critical hit with it against a creature's astral body, you can cut the
silvery cord that tethers the target to its material body, instead of
dealing damage.
*note that the effect only severs the cord - it does not state an instant death effect.
Astral Projection:
Your astral body resembles your mortal form in almost every way,
replicating your game Statistics and possessions. The principal
difference is the addition of a silvery cord that extends from between
your shoulder blades and trails behind you, fading to Invisibility
after 1 foot. This cord is your tether to your material body. As long
as the tether remains intact, you can find your way home. If the cord
is cut-something that can happen only when an Effect specifically
states that it does-your soul and body are separated, killing you
instantly.
Note: It is uncertain if the "death" effect of having your cord cut is a property of the cord itself - or a property of the astral projection spell.