Apartments, HOAs and similar communities are free to specify community rules, expectations and consequences in a contract/lease. When a party breaks those conditions then allow the community to enforce the contractual remedies.
There is no reason to involve the state here to take away a person's life and liberty. Just allow people to interact (or not interact) voluntarily.
Unfortunately keeping weed a criminal substance is the best option as police enforcement can be sought to counter anti social behaviour.
Furthermore, noise is regulated by local authorities in my jurisdiction
Further calling police to handle a noise disturbance is a nuclear option. I'd hope people would have exhausted every other avenue before wasting the police's time on a noise problem.
If it bothers you, you could take it up with your neighbors just as you would if they were blasting loud music late at night.
Criminalizing it just leads to absolutely ruined lives and misery on a much worse scale than just an unpleasant smell.
For anyone dealing with that situation, the only truly effective solution is to make sure the next time that you choose an apartment complex where the landlord does not allow smoking on the premises (whether tobacco or marijuana).
If your only interactions are asking to turn the volume down or don't do the $annoying_thing, yes you'll get that response. And yeah some times you'll have neighbors that simply won't engage in community building but once I figured this out I realized those people are the exception not the rule. I also ended up getting some relationships that I would have never been exposed to in my professional or personal life.
The vectors for spreading of air between apartments can be varied. Internal, external, air intakes, communal infrastructure etc.
How this relates to the unavoidable and highly pungent smell of weed I do not know
Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: division by zero
Not really. If you can't sleep in your own bed because a pungent smell of shit permeates your home that's not acceptable.
You might be happy to live like that but civilised people are not
Similarly to cigarettes, if you vape cannabis the smell is much much much more tolerable, it doesn't linger and it's much reduced.
I have people vaping nicotine in my building and, sure, I'm not a fan of smelling vanilla or whatever flavour they're vaping today, but it doesn't last long and it doesn't linger.
Tough choice.