@xd_kimmyy The treaty provides you with the right to be considered a non-resident of one specific country. You can't choose which country that is, though. Which country you have the right to be considered a non-resident of depends on the facts of your life.
It is not mandatory to assert your treaty-based right to be considered a non-resident of whichever country the treaty provides you with the right to be considered a non-resident of. But if you don't assert your treaty-based right, you may be treated as a resident of both countries simultaneously, which will typically result in double-taxation.
The reason it typically results in double-taxation is that the tax imposed by the country you had the right to be considered a non-resident of violates the treaty to the extent it exceeds the amount of tax you would have paid if you were treated as a non-resident by that country, and neither country will provide a foreign tax credit with respect to foreign tax that violates a treaty.
For example, if the treaty gives you the right to be considered a non-resident of Japan, and you let Japan tax you as a resident (e.g., by taxing you on the sale of crypto, which is not Japan-source income), Canada will not give you a foreign tax credit in recognition of the tax you paid to Japan, because the tax you paid to Japan—in this example—violated the treaty. Only foreign tax that complies with the treaty can give rise to foreign tax credits, which is why it is typically important to (1) work out which country you have the right to be considered a non-resident of, under the treaty and (2) do whatever is necessary to ensure that you are treated as a non-resident by the relevant country.