This is essentially what hospice is in the US. They stop curative treatment and focus on comfort. Then at the end when the person can no longer function to eat or drink they increase the morphine dose to a high level until they pass.
https://www.sciencedirect.com/science/article/pii/S088539240...
There are many who will raise their hands with anecdotal counters to this, but I think much of that is borne from misunderstandings about end of life generally, which is a charged and difficult topic lots of people would rather not learn more about.
I highly recommend the book Being Mortal by Atul Gawande for anyone who wants to explore the topic further—or really for anyone who has loved ones at all!