The ethics of relieving end of life anxiety with psychedelic drugs is in question. I would like a risk/ benefit analysis according to all the facts. If the benefits outweigh the risk of harm, then I would deem the therapy to be ethical for the common good.
Laws are not made on a cold calculation of harms. A range of social and political forces contend, and they will be different in different societies with different histories and legislative mechanisms. In legal training, edge cases that created precedents are used all the time, where legal outcomes conflict with various intuitions and ideas about what an ethical outcome would be. Above all we shape society by regard for what kind of people we think we should be, and harm minimisation is only one candidate for shaping that.
See Is artificially generating images of minors in sexual positions unethical? for how there are a range of emergent legal frameworks around the world on this issue. It is interesting to note that, while Japan has some of the most liberal attitudes of any developed country on this issue, they have among the world's most draconian drug laws. This seems to relate to a different locus of control, that your social responsibilities matter more than individual goals, leading to drug use being socially shamed, but a great deal of latitude to let families run themselves – see attitudes to domestic violence.
Global drug prohibition was led by the USA, and it's widely seen as related to the failure of alcohol prohibition, and racist reappropriation of the enforcement infrastructure, by playing on fears that cannabis was enabling racial mixing. But in modern times, some states in the US are close to leading the world in cannabis legalisation, and medical psychaedelics research. This can be linked to a far more individualist locus of control, with for instance the discussion of Aaron Rodgers use of ayahuasca focusing on his benefits, rather than the social risks to others of copying his use.
There is a widespread misunderstanding about drug use, that is made clear by alcohol. Even though for a large majority use is safe, for some (usually with identifiable risk factors), alcohol is extremely dangerous; not only is it addictive but sudden withdrawal by an addict is often lethal. Heroin and cocaine use is estimated to result in addiction for only around 15% of users, and for alcohol around 5% but with a much higher user base, and better social support guiding use and on overcoming addiction. Psychaedelics have almost no risk of addiction, although there is some argument about dependence on ketamine, but there are risks of permanent psychological harm, often associated with risk factors and usually identifiable by trying low doses in a controlled medical situation. But not always. There has to be a balancing of risks and benefits, but as attempts at alcohol prohibition showed there also has to be accommodation in practice to cultural attitudes. And as the prosecution difference between similar amounts of crack cocaine vs cocaine, we should also be aware of racist and victimising motives in drug policy.
US law has had an exemption on peyote use for religious purposes since 1994. Some countries, including Brazil, Jamaica and Peru, never followed the US lead in criminalising psychaedelic use, where LSD's association with counterculture and anti-war movements saw a sudden end to very promising research on medical uses of it. Many countries did enough in law to meet US political pressure around The War On Drugs, but in practice didn't widely enforce them on cannabis or psychaedelics.
The Johns Hopkins research on terminally ill patients was so strikingly overwhelmingly successful compared to any other treatments, that the FDA requested an extension of the research to treat major depression in general. This shift in awareness of risks vs rewards makes it almost inevitable medical use will be legalised in most countries, especially given widespread disillusionment with SSRIs and recognition data manipulation was used in establishing clinical recommendations for many of them, and to hide addiction and harms.
Johns Hopkins Medical has been researching psychedelic drug therapy and have found this therapy to greatly reduce end of life anxiety in most of the terminally ill patients.