Short Answer
Becoming rich isn't exactly subtle, and Locard's exchange principle suggests that there's always some way to get to the truth in matters like this.
Long answer
Let's be clear about something: This isn't Harry Potter, the state doesn't know when a transmutation is performed.* Mustang was sent to find Edward because they had heard about his abilities by word of mouth.
There is no surefire way to know whether or not an alchemist has created gold. While it is possible for them to do so, you'd find that any mechanism they had for catching said alchemists would be similar to the real-world practice of insider trading or counterfeiting.
In counterfeiting, there are telltale signs of illegal bills. In alchemy, transmutation marks are often left by alchemists as the science is not really a perfect one. As @looper mentioned, you could melt the gold, but then you'd still need equipment to put it back into bars or some tradable form. Alchemists aren't blacksmiths.
That said, there's exceptions. Consider Major Armstrong, whose alchemy is one of the most refined around, such that he leaves no transmutation marks on his average transmutation. Say he manufactures a few gold bars and sells them to pay for some under-the-table deals he made. The state would have no way of catching him—there is nothing that sets his gold apart from real gold, and they probably wouldn't even know about the deal to begin with.
However, say he starts doing it regularly. He upgrades his car, his house (even though he already has a mansion, go figure), wears a brand new watch, and so on. This is likely the point when the state would start to question where he acquired such funds (especially knowing his salary). In this case, he could be "audited" (assuming such a practice exists in-universe) and he'd likely be caught.
*Now, there is a point I have not addressed:
Because, in Brotherhood, Father regulates all alchemical exchanges in Amestris, it's possible he'd have some way to look in on this. However, I highly doubt that, even though he essentially owns the state military and thusly all of Amestris, he'd care whatsoever about gold entering the country's economy illegally.
This answer probably got a bit more "real" than you expected, but I think that's just the truth. It's the same with their "creating humans" rule; they'd have no way to know you did it until you did something to make it clear.