Yes it’s a dumb law. It’s not really enforced unless you are a total dick. And if you are stuck in an apartment there are other less intrusive ways to smoke that won’t piss off neighbors (medical or not).
Nobody is busting down doors because they smell weed. It’s always a neighbor complaint. There are a lot of watchdogs And there isn’t going to ever be a respectful way to smoke a joint in a shared building.
It’s certainly not perfect, but it’s trending in the correct direction.