The comparison of Boks & C's is not accurate to real life, but I can understand how you got there if you consume only left-wing Spanish content. It's true that they are pro-Spain, but their anti-nationalist ideology was mainly in their pursuit of Spain being just 1 member of a larger European federal state. C's was liberal and even left-leaning at the beginning, and they won their best performance when they cast themselves as the centrist pragmatic liberals in the room willing to deal with anybody. They turned rightwards when the Catalan crisis happened, and immediately began to lose their support outside of Catalunya (though that didn't last long either), leading to their current situation where they didn't even bother competing in the 23J election.
Is it all that relevant what the party was at the beginning? Certainly a lot of Ciudadanos voters ten years ago perceived the party as liberal and anti-nationalist, but my understanding is that in the late 2010s when Rivera got the idea that he could supplant PP his party's rhetoric became pretty straightforwardly right-wing nationalist. Certainly that's why all the voters left.