It is an interesting trick. Will I have to pay the school if I leave it early, and to reimburse any grants that I may have gotten? Do you know anyone who had done that?
Most STEM graduate programs will typically pay you to go to school and waive all or major portion of tuition fees. You don't need to repay anything. You might burn a few bridges at most. I have gone to graduate school where some of my classmates who came from other countries quit within one or two semesters and started working for companies full time.