That’s what happens when states get to regulate these kinds of things. Notice it’s mostly progressive states that this applies to. States that put laws on their books against this. The reason it doesn’t count in those other states is because, for all intents and purposes, it was legal there.
People complain about California a lot, but this is what all of our “stupid useless laws” are for.