Everyone knows what a gun looks like
They are relatively easy to detect, and security personnel may be trained to better spot those carrying a gun. Acquiring a gun, especially for foreigners, can be especially difficult. Sneaking one into the country is more difficult.
Knives are similarly "obvious", and require a close range attack.
In either case the physical motions necessary to draw and use the weapon provide a brief but potentially sufficient window to mount a defense. While a solid strike from either is frequently lethal, an attacker who feels compelled to try to escape may not have the luxury of making sure a death blow has truly been struck.
They are also difficult to dispose of.
Almost nobody knows what polonium 210 looks like
It was several weeks before anyone thought to consider Polonium-210 poisoning with Litvinenko. And this was mostly a coincidence: a nuclear physicist happened to be watching a newscast, and recognized the data that was mentioned as being a signature of Polonium-210. In this particular case the substance does not even have the "usual" radioactive signature. Geiger counters won't pick it up, and it's pretty much only lethal if you ingest it. It emits alpha radiation, and your skin suffices to block it.
The substance was smuggled in multiple times because it looks like little more than some water. The alleged assassins even handled the material carelessly and disposed it by simply flushing it down the toilet because they both didn't fully understand the potential dangers and because they didn't think it could actually be detected and traced.
Other chemical agents are similar: they are difficult to detect unless you know what to look for and have things specifically designed to find it, and usually only require small quantities to be lethal (making it ostensibly easier to dispose of, especially if they readily dissolve in water).
It takes a fraction of a second to diagnose a gunshot wound
Getting stabbed or shot is a pretty obvious thing. They make noise, and the damage is immediate and easily recognized. All of this makes it very difficult for the assassins to get away.
It is preferable for them to return, as they may conceivably be able to commit further assassinations, which is a non-trivial job generally requiring non-trivial skills. Additionally, an assassin who is caught is someone who won't be getting paid and who might rat out who it is that wanted them dead, which is highly undesirable on all ends.
Stabbings and shootings are done by people who aren't seriously planning to get away, or who are acting emotionally in the spur of the moment.
Seriously, what's polonium 210 even look like?
On the other hand, it may take days or weeks for a poison or chemical agent to cause symptoms to appear, and may take even longer for the nature of the problem to be realized. It may just seem to be a really nasty flu for a time, as was the case with Litvinenko. By the time the truth is discovered it may be far too late to save the victim.
In the meantime, the assassins can calmly try to clean up their tracks and make their way back to their home country, or other safe haven. Litvinenko's alleged assassins had long since returned to Russia before suspicions fell on them, and Russia will never extradite a national (especially if this was actually a government ordered kill).
It's a way more horrible death.
A slow, miserable, excruciating death sends a message that a quick gunshot to the head does not: do what these people did and you will suffer the same awful fate. Some Russian officials even explicitly said as much in regards to Litvinenko. It's a little bit easier to face death if you believe it will be quick and painless and limited to yourself. But weeks of agony, with friends and loved ones watching you go through it, perhaps not even knowing what's wrong with you for most of it? That's much harder to take on.