https://jamanetwork.com/journals/jama-health-forum/fullarticle/2845356
I think this is the study. They controlled statistically for a variety of factors that various people in this post are assuming had interactions.
Also, the author's are from a variety of reputable universities and institutions in California.
Cox proportional hazards regression models were used to measure the strength of associations between adolescent cannabis use and incident psychiatric diagnoses, with adjustments for sex, race and ethnicity, neighborhood deprivation index, insurance type, and time-varying alcohol and other substance use.
The author's used statistical control methods for socioeconomic factors.
https://jamanetwork.com/journals/jama-health-forum/fullarticle/2845356