For visitors although there is no specific rule it is generally recommend on this forum to be outside of the country for near the same amount of time in the country. So if spending 5 months in Canada then leave and cone back in 5 months.
As said there is no specific rule written by CBSA so is all about what perception CBSA might get of someone spending too much time in Canada possibly living versus being a genuine visitor. Ultimately is a personal decision so no way to predict if would even be an issue or not, maybe nothing to be concerned about at all.
Generaly if someone has a 5-6 month stay they are better off using the apply to extend stay process given that takes 2-3 months to process during which time on implied status and then if approved get time on top of that. So in theory with a full 6 month extension plus the implied could see 8-9 months But no guarantees how long Granted