The exit tax doesn't apply to "gains", it applies to the "value of your company" which is calculated in a way that often means you will owe thousands or even millions in money you don't have, and at no time had.
Selling a company and paying tax on the profit in tax is a completely different proposition from paying tax on hypothetical profit you haven't made (and might never make) just because you want to move.