Sorry if you have heard this before but you may have ADHD or something similar. I found myself in a similar pattern of using cannabis to motivate myself to do the more boring tasks that inevitably come up being a full time software engineer and after several months of therapy was diagnosed with ADHD.
FWIW, I find that if I have a boring task and attempt to use cannabis to power through it, half of the time I complete the task with vigor and then other half of the time I do literally anything else. So my story is as similar to yours as those saying that cannabis leads them to be anything but productive.