If for the country you are visiting, refer to their short-stay rules. e.g: you have Schengen visa for 2 years, you are only allowed to stay in the schengen area 90 days every 180 days.
If for Canada, leaving for 4 months as a refugee will rise red flags when you come back, and I would advise to seek legal consultation before leaving.
Remember you are not a citizen yet and every day counts toward your citizenship. and even that you are a refugee here, your PR status can be ceased for multiple reasons.