There is a huge difference between using necessary levels of pain medication that happens to hasten death and deliberately overdosing a person with the intent of causing death.
There are times when that line is not a bright clear one. Are you not relieveing suffering and death occurs in both cases? If you know that the next dose of pain meds will kill your patient how is that different than knowing that the next dose of pain meds will kill your patient? Don’t get me wrong I am not one who advocates for ‘assisted suicide”. But thelines can be very very blurry