Once you marry you can file a petition for her based upon her lawful entry, seeking to adjust her status based on marriage. If you succeed in that process she will become a conditional legal permanent resident (LPR), will be able to seek removal of the conditions after two years, and will ultimately be eligible to naturalize.
You are correct that she should not leave the U.S., and in fact she is presently at risk of removal.

