I think it's interesting that this thread has become very polarised between people supporting the OP and people critical of her. Rather like the very polarised dynamic between the OP and her ex, and now the OP and her children.
I suspect this is a dynamic that somehow turns up a lot in the OP's life. If that's the case, OP, you might want to explore that with your therapist. If s/he is any good tbh they should have picked up on this already, though I would expect that you would find the same dynamic being re-created in your relationship with them as well, ie that they are either for or against you and that there is no middle ground.
It's not victim blaming to notice this, or to notice that it is a common pattern. That is not the same as saying it's the OP's fault, just that it's a pattern she commonly finds herself in. Patterns like that tend to date from life-long experiences, often originating in childhood, and are so pervasive as to be invisible to the individual stuck in them.
OP, IMO the root of your difficulty is not whether your children choose you or your ex, but your expectation that things be polarised like that at all. Work on this with your therapist, please - it is your best chance of having a continued happy relationship with your children as they become adults.