What's important is that cyanides, despite their most toxic form, always decompose into common substances. Unlike heavy metal atoms, these substances are harmless in normal concentrations or even beneficial for the environment.
The cyanide group consists of carbon and nitrogen, which are commonly found in nature, and play an essential and irreplaceable role in all living organisms. Cyanides react naturally with the processes of nature. Their molecules break down into harmless substances and are therefore not dangerous to the environment in the long run. On the contrary, heavy metals released from their compounds, for example, mercury, are toxic and non-degradable in nature.
Learn about cyanides.