Being outside Canada could affect both healthcare and social benefits. For healthcare if you leave during the first year it can impact your coverage in some provinces. For healthcare what really matters is that you are a tax resident and are paying into the healthcare system so being gone for a month or two won't change your tax status.I’m really confused as to why this would be an issue. Are you a PR or citizen? Either way, leaving the country for 2-3 months does not disqualify you from coming back in, provincial healthcare, social benefits, etc. So why would it have any affect on your application? If anything, you’re further proving your relationship is genuine by going to visit your spouse.
In terms of welfare you can't go visit a spouse for longer periods without affecting your welfare benefits. For example in Ontario you must get approval for an absence of over 7 days from Ontario. You will only be granted exception in very specific circumstances like for medical reason or exceptional circumstance. Would imagine things like a short visit to attend a funeral would be aporoved but the approval length is unlikely to be months.
https://www.mcss.gov.on.ca/en/mcss/programs/social/directives/ow/9_2_OW_Directives.aspx
https://stepstojustice.ca/questions/income-assistance/can-i-leave-ontario-and-still-get-financial-assistance
PRs are required to remain in Canada during spousal sponsorship so CIC is approving PR for the spouse of a PR who is actively establishing themselves in Canada through things like work or studying. Citizens can sponsor while living abroad.