Do not leave unless you are CERTAIN this is the best option. And I do not think it is.
First, if you leave and do not have a visa to re-enter, you will probably be refused (because you already overstayed). If so, you can and likely will have your application refused because no longer in Canada - meaning you will have to re-apply as outland from outside Canada. (And will be separated from your spouse even longer)
Second, there is a specific policy that (as I understand) basically means that you being out of status will not cause a problem to your application. And I believe in MOST cases CBSA will delay taking any actions to remove (deport) you, unless there is some other issue like criminality.
The policy is here (I think):
https://www.canada.ca/en/immigration-refugees-citizenship/corporate/mandate/policies-operational-instructions-agreements/immigration-refugee-protection-act-spousal-policy.html
I'm not an expert. Speak to a professional - a lawyer, not a consultant - if you need better help with this. It may just amount to a consultation saying you'll probably be okay.