If your girlfriend already filed her tax return and IRS accepted it, she will have to file an amendment, and you would then need to file a return on paper, claiming the dependent.
you and the other parent live together, either one of you (but not both) may
claim the child. You may decide between you which one will claim the child.
Only if you can’t agree, do the IRS tie breaker rules apply, to see who has
first choice. It may be worthwhile to prepare trial returns, both ways, to see which way the family comes out best.
This tool may be useful: https://turbotax.intuit.com/tax-tools/calculators/taxcaster/?s=1.