Cannabis use isn't the solution to opioid deaths.
Other countries have strict laws about cannabis, and those laws are enforced, and they don't have the problems of opioid deaths that the US has.
The real solution to opioid death is adequate treatment for pain; and treating addiction as a health problem not a criminal justice problem.