The city, promised some autonomy by China, is trying to move on from a security law imposed by Beijing. Companies are learning that’s not always possible.