This is a detailed case study of one patient published in Frontiers in Psychiatry in July 2020, so it cannot draw any broad conclusions that apply generally, but it did show a significant improvement in depression & quality of life.
The patient had tried pharmaceutical medicine with no positive results and an increase in adverse events. Smoking cannabis flower at the rate of one half gram 3-4 times a week resulted in an 80-90% improvement in OCD behavior lasting 12-15 hours.
This paper also includes a "review of current literature on the effects of cannabinoids in animal models and patients with OCD and suggest a cannabinoid hypothesis of OCD."
The research paper is here.