It absolutely wouldn't apply here: while a competent patient can't insist on treatment doctors aren't willing to give, they're absolutely free to find one who is, in the UK or abroad, whether the treatment is effective or placebo, painless or excruciating. That does not necessarily extend to a next-of-kin; the court may rule there that the patient is better served by a relatively peaceful death rather than further treatment if it's likely to be futile and painful. Even so, that's really quite rare - a handful of very public cases about dying children notwithstanding.
The hearings are in the Family Division of the High Court, or sometimes in the Court of Protection, and the judgments are public. This[0] is a fairly typical one selected at random. A very sick child at the end of life with a progressive and incurable disease, with disagreement between the parents and medical staff about the best course of treatment. It's easy to understand and well worth a read if you're interested. I don't think the court is in any way infallible, but it's a world away from some of the more tabloid criticism that's thrown at it.
[0]: https://www.bailii.org/ew/cases/EWHC/Fam/2021/2927.html