I am a non-resident, paid exit tax last year, and this year I am filing under section 217. Do I have to pay capital gains on stocks sold or file a T5008(ETFs)?

There is no withholding tax on capital gains and I already paid the exit tax. I heard I would have to list the capital gains for tax purposes in my new country, but not Canada.