As noted in Jay's answer, Rashi on 35:2 comments that shabbat is placed first in Vayakhel to teach that shabbat takes precedence over building the mishkan.
However, we then have to ask explain why the order is different in Ki Tissa. The Meshech Chochmah (R. Meir Simcha of Dvinsk) asks this question.
He offers an answer (more b'derech drush in my opinion) by noting what took place between these two occurrences of the juxtaposition of shabbat and the mishkan i.e. the episode of the Golden Calf.
The significance of this is explained as follows:
R. Meir Simcha points out that the avodah (service) in the mishkan was carried out on shabbat, despite involving melachot. He explains that this is because, whilst shabbat affirms the belief in the existence of Hashem as the Creator of the universe, the avodah demonstrates the more profound fact of His continued involvement in the world that He created.
This being the case, why in fact could they not build the mishkan on shabbat? R. Meir Simchah explains that only the amplification of a pre-existing reality of Hashem’s Presence in this world, takes precedence over shabbat.
Before the mishkan was built, there was no Divine Presence for them to extend, and therefore they couldn’t build the mishkan on shabbat. Only once the mishkan was completed, and the Divine Presence was there manifest, were they allowed to magnify that through the service there, even on shabbat.
Now, we can understand that, before the sin of the Golden Calf, they would actually have been able to build the mishkan on shabbat.
Before the Golden Calf, Hashem had promised that the Children of Israel themselves would be a manifestation of the Divine Presence, even without a mishkan. (בכל מקום אשר אזכיר את שמי אבוא אליך וברכתיך).
Since the mishkan would only be expanding upon the Divine Presence already present upon the Children of Israel, building it could take place on shabbat, in the same way that after the Golden Calf, the avodah, which serves to amplify the Divine Presence present in the mishkan, could be performed on shabbat.
After the sin of the Golden Calf, the Divine Presence left the Children of Israel, and they needed to first build the mishkan to experience the Divine Presence yet again. This was not permitted on shabbat.