From what little I know, the rule is on how many hours you work. If you can freelance 20 hours a week and call that a living, as long as you keep up with classes, it's theoretically fine. However, as soon as you graduate, you'll have to leave. You can just take a quick hop to Korea and back (I've heard that there's a lot of same-day round-trips to Korea for visa renewals) but you'd have to come back on a tourist visa and then you couldn't work at all, probably (some countries can do a working vacation, but the hours allowed are very limited.)
Of course, if you have a sponsor for a full time job, you can finish your studies, do the korea hop, and come back in on a work visa. In that case your employer would help you through the details.