You don't have to leave Canada to apply for permanent residency, it's just not an issue at all. Since you are in Quebec, have an appointment with a local immigration lawyer and review your options: there are several ones.
Ask A Question | Learn more about Canada
How can foreigners on visitor status in Canada apply for residency-by-investment?
I'm a foreigner currently in Canada on a visit visa status; I had come to visit family and explore some business opportunities and now I'm thinking about staying by applying for residency-by-investment status. Would I have to leave the country first? What are my options given that I'm in Quebec where investor program has been suspended?