Unless the state itself is criminal. Not only can law stray from morality, authorities of the state can even violate the laws of that state itself. If you can imagine an extreme authoritarian state with a constitution, can't you also imagine that the leaders of that state choosing to ignore that constitution?
But before even getting into the above, you've assumed the possibility of perfect surveillance. Who or what and how could that ever be possible?
The only way I can conceive of perfect law enforcement is to have very few if any laws. Everything else is an excuse for the personal fancies of authoritarians.