It’s because you’re an idiot.
Don’t report me or anything, I’m not trying to just put you down, I’m trying to help you. You need to recognize that this is idiotic behavior. You can’t stop it which means that it’s something you identify with. If you identify with idiocy that makes you an idiot.
Knowing this, you can try to move past it. Be open to women you meet that you are attracted to that you are an idiot. Tell them you find them attractive now, but the second they show interest back, you’re going to lose interest. Tell them you can’t really control this, it just happens.
I know women, a lot of women are going to look at this as a challenge. If they know what’s going on, they’re not going to just let you go once you trigger that behavior. They’re going to, as a matter of their feminine pride, try to figure you out so they can have you for themselves.
I can’t easily tell you what’s going on in your head that’s causing your idiocy. But I bet it stems from somewhere deep in your childhood. The best path forward I’ve found for these kinds of things is a bit paradoxical. Never look back. Don’t hold on to the past. Whatever happens today is more important than what happened yesterday. Never give the past power over your future.
If you can adopt a “never look back” attitude, and find a wonderful woman who is willing to help fix you, you can get over this and find a real working relationship.