Apples and oranges I think.
Drugs are deeply rooted in culture and humans are drawn to altered states of consciousness.
Modern surveillance tech isn’t rooted in the same biological or cultural factors, and enforcing laws about its use seems unlikely to suffer from the same issues brought on by the war on drugs.