Girlfriend broke up with me after telling her I'm trans?...

This is being posted under anonymous because I'm only out to immediate family and my ex girlfriend and I'm not comfortable with others knowing yet.

Anyway, I'm a ftm and I have been dating a girl (let's call her V) for about four months. We met on a dating app and I didn't feel safe telling anyone up front. A few days ago, I came out to her as trans, and she didn't really take it well. She pretty much said that she didn't want to continue the relationship because "it wouldn't be good for either of us," and that she wouldn't be happy to continue dating a person who isn't biologically male and that she wouldn't be comfortable having sex with someone who has the same parts as her, which I understand.

Who is in the wrong? Should I have told her sooner so that neither of us would have put four months to waste? I'm kind of scared to put myself out there, but I also don't want to end up with the other party being disappointed and I also don't want to be disappointed that the relationship didn't work out just because of my gender identity...