It's not clear that the ring would even activate
The operative part of the Ring of Mind Shielding's description is:
If you die while wearing the ring, your soul enters it, unless it already houses a soul.
However, the language used to describe the lich's abililty to reconstitute itself from its phylactery seems to carefully avoid the words "death", "die", or "kill", instead reserving these words for what happens when the lich is destroyed after the phylactery is destroyed. In the Monster Manual's description of the process:
Death and Restoration. When a lich’s body is broken by accident or assault, the will and mind of the lich drains from it, leaving only a lifeless corpse behind. Within days, a new body reforms next to the lich’s phylactery, coalescing out of glowing smoke that issues from the device. Because the destruction of its phylactery means the possibility of eternal death, a lich usually keeps its phylactery in a hidden, well-guarded location.
And in the lich's stat block:
Rejuvenation. If it has a phylactery, a destroyed lich gains a new body in 1d10 days, regaining all its hit points and becoming active again. The new body appears within 5 feet of the phylactery.
Note that the in addition to not mentioning death, the lich's Rejuvenation trait also makes no mention of raising the lich from the dead. So, RAW, it seems that a lich with a functioning phylactery does not die when its body is destroyed, which means the soul-trapping ability of the Ring of Mind Shielding never activates.
Even if the ring does activate, it can't free the lich's soul from the phylactery
The description of the process of becoming a lich is quite clear that the lich's soul is permanently housed within its phylactery, as shown by the following excerpts (emphasis added):
A lich is created by an arcane ritual that traps the wizard’s soul within a phylactery. Doing so binds the soul to the mortal world, preventing it from traveling to the Outer Planes after death.
And in the next paragraph:
With its phylactery prepared, the future lich drinks a potion of transformation — a vile concoction of poison mixed with the blood of a sentient creature whose soul is sacrificed to the phylactery. The wizard falls dead, then rises as a lich as its soul is drawn into the phylactery, where it forever remains.
And importantly, the sole purpose of the phylactery is to make it as difficult as possible to access or liberate the lich's soul:
Destroying a lich’s phylactery is no easy task and often requires a special ritual, item, or weapon. Every phylactery is unique, and discovering the key to its destruction can be a quest in and of itself.
So, even if you as a DM ruled that the ring did activate upon the lich's discorporation (which is not an entirely unreasonable ruling), I would argue that it still can't pull the lich's soul out of its phylactery, since that is exactly what the phylactery is designed to prevent.
In summary: the ring can't trap the lich's soul because the lich's soul is already trapped in its phylactery.