Download CPT56 here https://www.canada.ca/en/revenue-agency/services/forms-publications/forms/cpt56.html
Then, fill out the one-page CPT-56, then mail it to CRA to receive it backed stamped by CRA: Canada Revenue Agency CPP/EI Rulings Division Social Security Unit 320 Queen Street, Tower A Ottawa ON K1A 0L5
Use business (self-employment) start date, and write "indefinite" for the end date; if using the fillable form that does not allow for any input other than numbers, use the five year maximum (mentioned on the CRA website) but note that CRA may call to limit it to three years.
IRS says:
The self-employment tax is a social security and Medicare tax on net earnings from self-employment. If you are permanently working in a foreign country with which the United States has a social security agreement and, under the agreement, your pay is exempt from U.S. social security tax, you or your employer should get a statement from the authorized official or agency of the foreign country verifying that your pay is subject to social security coverage in that country. If the authorities of the foreign country will not issue such a statement, either you or your employer should get a statement from the U.S. Social Security Administration, Office of International Programs, at www.socialsecurity.gov/international/agreement_descriptions.html
Social Security Administration Office of International Programs P.O. Box 17741 Baltimore, MD 21235-7741
The statement should indicate that your wages aren’t covered by the U.S. social security system. This statement should be kept by your employer because it establishes that your pay is exempt from U.S. social security tax.