In other great Europeans war like the Seven years wars not all colonies were taken from the defeated. For example, Britain offered to give back New France, but France decided to keep its Caribbean islands instead.
Why were all of Germany's overseas possessions taken? What changed?
Simply put, the situation was very different.
At the end of the Seven years war the British had been unable to capture Haïti from the French, therefore the former had no reasons to give it to them. The British proposal to exchange French North America for it was because Haïtï at the time was the most profitable colony in the world, and had more value economically than the all of the rest of France's empire. You can see why the French would refuse the trade.
Germany on the other end had all of it's colonies occupied at the end of WW1, and the Allies had no reasons to give them back. Especially when British fear for German competition at sea was one of their main reasons behind joining the war.