Short answer; as long as you do not take any permanent residency in the country you are visiting, you will be able to stay up to 2 years.
Long answer; Since you are accepted refugee in Canada; your status is a refugee with positive decision. This status can be revoked for only two reasons:
There are 2 ways that refugee protection can be removed:
- A person can cease to hold their refugee status [A108] if, for example, they voluntarily reavail themselves of the protection of their country of nationality or obtain protection from another country (citizenship).
- A person can have their refugee status vacated [A109] if they obtained that status by directly or indirectly misrepresenting or withholding material facts relating to a relevant matter
Source:
https://www.canada.ca/en/immigration-refugees-citizenship/corporate/publications-manuals/operational-bulletins-manuals/refugee-protection/vacation.html
So your travel document and refugee status will stay valid as long as you do not do things outlined above.
According to Refugee Convention 1951, if you take residence, more than two years, in other country then your original accepted country (in you case it is Canada), CBSA and IRCC may deem you residence of that country and ask you to get status there. In order to prevent this kind of problems, Canada only issues travel document with two years of validity for the people who has protected person status and does not have PR. After the PR; the person can apply and get 5 years valid travel document.
If you are traveling outside of Canada as refugee, always have valid and good reason. When you are coming back keep proper documentation about reason of your visit. Because CBSA will ask you where have you visited and may ask you to provide proof.
Another important thing is, take the original decision letter with you while you are traveling. Because that document will let you enter Canada again.