Medical technology is not yet at a state (and probably never will be) where we have foresight and skill to balance pain relief and life protection in the face of all the ways a body can succumb. Every choice is a gamble. There is still much to improve.
At the end of life, a body is wastage, and gives no one pleasure or comfort. Don't let that overshadow everything before.
May the memory of your mother's many years be a blessing for always, as your love for her comforted her for as long as she was conscious.