Open source code, books and knowledge should never be blocked, until we learn this we are no better than the people we are trying to "punish" with pointless and ineffective sanctions.
What's your alternative to sanctions that's more effective? War?
[0] https://www.wto.org/english/res_e/reser_e/ersd201803_e.pdf
The literature isn't conclusive either way, there's evidence in both directions. But sanctions definitely tend to hurt everyday citizens more than they hurt the targeted governments. Dictators and cronies aren't going to have to worry about increased prices of goods - they get whatever they want - that's sort of the point of being dictator