Can a person write in their will, “I would like the withdrawal of food/hydration/treatment when I have no meaningful ability to interact with others and my condition is terminal?”
It is not permissible if it entails hastening their death and the will would be invalid.