Let's imagine there is some law (for example, gambling prohibition law) and malefactors try to find some workarounds to continue their business (for example, pretend like this is not gambling but lottery). What are these law workarounds called in general?
They're called loopholes or legal loopholes, if you want to make it clear that you're referring to a loophole in a law.
As a side note, corresponding verbal phrases include exploiting the loophole or circumventing the law.
Loophole is the general term, but there's a special case:
Tax avoidance is the legal utilization of the tax regime to one's own advantage, to reduce the amount of tax that is payable by means that are within the law. By contrast, tax evasion is the general term for efforts not to pay taxes by illegal means.
A loophole is a term of derision for an exception in a law (or other legal regime).
You appear to be asking for a term to describe the practice of pretending that what one is doing is legal. There's no general term for that; the closest is "sham" which means an arrangement which purports to be one thing, but is actually something else.