To be fair, over the past year I've scaled my cannabis use way back and my memory is definitely better. But only like 30% better, which is nice but not a night and day difference. (Memory issues were not why I stopped.)
On the other hand, there's a certain creative groove that's a lot harder to get into now. So there's a tradeoff.
Just one guess, but a lot of memory formation happens during various sleep cycle(s). Persistent cannabis use is commonly associated with lack of dreaming, which suggests it interferes with normal sleep cycles.
I was experiencing lack of dreaming after some time of daily use, and was able to regain my ability to consistently dream (and remember them) by simply ceasing cannabis use by 5pm each day. I don't experience noticeable problems with memory, but YMMV.
On the other hand, there's a certain creative groove that's a lot harder to get into now. So there's a tradeoff.