Good questions — and the key one to sort out first is whether you were actually a tax resident of Canada during those two years.
Tax residency isn't the same as PR status. CRA decides it based on your residential ties: a home in Canada, a spouse or partner in Canada, dependants in Canada (the...