Unfortunately you can live long enough to get dementia.
Stage 4 liver failure is often accompanied by hepatic encephalopathy.
We’re currently experiencing that with an adult child.
Sad , God’s grace to you.