Underlying cause of death in that case would be cancer. Immediate cause of death would be whatever issue was caused by the medication. The underlying and immediate causes are listed separately on the death certificate along with any conditions that complicated survival.
The UCOD is the disease or injury which initiates the chain of events leading directly to death. Patient develops prostate cancer -> given medication to treat prostate cancer -> dies from side effects.
I’m sorry for your loss. The reporting is normal and straightforward. It’s not there to mislead or “cook the books”. It’s there to provide a complete picture of what happened to each person who is deceased.
Gotcha. Yes I get it, he would not have been on that medication if he had not had cancer.
On the other hand I had a great-uncle who chewed snuff for most of his adult life. When he passed away in Upstate New York at age 94 the state listed “tobacco use” as cause of death.