The official website for The Settlers of Catan

Question about “Cities & Knights” Expansion Barbarians III: Players are Defeated - After losing my last city, do I have to return all city improvements, Progress Cards, and commodities?

Answer

No. You merely can’t purchase any further city improvements before having built a city again.