That's a good question, and it is why they started exit control as of June 2020 for air travel. But not soon enough, in my opinion.
If they suspect the applicant had been out of Canada for an extended period of time, and if entry/exit stamps on the passports don't show this, I heard that they sometimes will ask you to produce an entry/exit record from the immigration authorities of the countries concerned (mostly your country of citizenship). Now that would be a pain in the ass.
In addition, they will ask for evidence for the period in which you claimed to have lived in Canada.
Now, if they were wise enough to have instituted exit control way earlier (which other countries have been doing for years), it would have made things so much easier.