Yes, if the PR application is rejected, you will have to leave. The most common reason for rejection is that the visa officer thinks the marriage is fake. So if you present a lot of evidence that your marriage is genuine, you will most likely be accepted. Because you will actually be living together (with you on the working holiday visa), you will have a lot of proof that the marriage is real. Get both your names on the lease or mortgage, for example, and both names on the utility bills. Take lots of photos of the two of you, and the two of you with family and friends.
You're not married yet, so I advise you that the easiest thing to do is to look at the application forms, see what kind of evidence they ask for, and make sure you can provide it. You have lots of time until the application will be sent, so you will have time to gather good proof. For example, when you get engaged, have a little party to celebrate that with family and friends. When you get married, make sure the occasion looks special and keep all proof of the marriage, including receipts for the banquet hall, a list of wedding guests, other receipts, etc. You don't need to have a big, lavish ceremony, but having at least a small ceremony will look better for the application than just a civil ceremony.