Your girlfriend took advantage of you by agreeing to shop for a house together, and then sabotaging you by putting an offer on the house for herself — and only herself — in spite of the fact that you’ve been living together for three years and had a house hunting agreement.
While she wants to live with you for the next three months until her house deal closes, my advice is to end the relationship now. You should expect more from a girlfriend, and her betrayal doesn’t speak highly of her respect or loyalty for you. Tell her to find somewhere else to live now, since she’s moving out anyway, and you should start looking for a great woman who would never go behind your back like this.