How would you even know a transaction was done for RL money...
By tracing patterns in in-game transactions. Everytime a high value exchange is made where one side is giving a lot and the other side is giving next to nothing, you flag it. If it happens a lot between the same account (or group of related accounts) and otherwise non-related accounts, you can fairly assume that something is happening outside of the game. You'll never get anything that'll stand up in a court of law but that's fine - if you're running a game service you are the law within that service as long as you've got the TOS to cover you.
It won't ever be perfect, though. Small-scale and occasional RW transactions will slip through, and organised currency-selling groups will figure out the algorithms and find ways round it, so it's an ongoing thing rather than a write-the-code-and-you're-done thing. It also has to be balanced so it can catch out-of-game transactions without flagging up genuine regular gifts, which is probably why FD took the original decision of simply not allowing direct credit transfers between players in the first place.
Of course, as the OP has highlighted, FCs kind of open up a loophole here but I suspect that FD have taken that into account. FCs are fairly heavily gatewayed and their owners have to set explicit permissions and options to enable the loophole, which makes the audit volume smaller, transactions somewhat easier to track and puts more time-risk on whoever is running the gold-selling scheme. After all, making a new account and grinding up the credits to buy and maintain a new FC adds more of an overhead than making a new account and grinding credits to sell, even if you're using exploits to grind the credits up.
It's an interesting subject if you're an incurable nerd. I read a lot about the whole gold-selling thing years ago when it started to happen in another game I played.
It's not as interesting if you're not, though, so I apologise to anyone who read through all this hoping to find something interesting.