My partner’s smoking weed habit is annoying me so much

From day 1, I know he smokes weed. That’s why I was unsure to start dating him in the first place. However, from day 1, I told him that if he smoked marihuana I prefered to pass, I don’t like to date people that smoke and so he told me he wanted to quit smoking, that he knows it’s not a good habit and that having a girlfriend that doesn’t smoke would help him a lot (contrary to his previous girlfriend who smoked marihuana with him. He told me he disliked that and felt unproductive). So he started to massively reduce the amount of weed he would smoke, switching from almost every day to 3 times per week (once a day). I was so happy with his improvement and also felt good that I was helping him quit this habit that has been with him since he was 17 years old (now 39!!). So the relationship grew a lot in a good way. Every time he started smoking more, we talked and he would cut down. Now, 2 and a half years into it, he started increasing the consumption of marihuana and we talk and he makes some improvements and next week he is back to the same amount. I’m seriously tired of this back and forth. I love him and he has so many good habits that have nothing to do with his weed habit that I don’t know what to do. I’ve been clear from the start telling him that I didn’t want to date a weed addict and he told me he wanted to quit it and tried its best. He proposed to me and wants to have a family but if he doesn’t quit marihuana for good or leave for social/sporadic situations only, I don’t feel comfortable. So I know I cannot change people and hate to ask for that, that’s why I was sincere from the start but he is constantly debating with himself btw quitting and continuing to smoke. I want to help him but this is seriously affecting my mood, my focus and the relationship.
Aside from any advice you could give me on how to handle this in a better way? (Acceptance has been my mantra all this time but it’s not sufficient anymore specially when he starts smoking more or tells me he wants a family and keeps being loyal to weed.)

I’m wandering: Why am I attracting this into my life? What is this situation/relationship showing/teaching me?