If they ghost you, it's probably because they made up with their ex.
They used you to boost their ego while they were on a long break with their ex. In other words, they were cheating and it's likely that this is how they cope in that toxic relationship. Someday you'll be very thankful that you didn't end up with them. All they have is a toxic relationship where they both sleep with other people whenever they fight and breakup.
You deserve someone who is loyal, faithful, committed, and wants to build with you. And above all, someone who will fight to protect what the two of you built together. Not someone who breaks up so they can go sleep with someone else and then return when things cool down.