Technically, there is nothing prohibiting in immigration legislation prohibiting a person from travelling to Canada for the purposes to give birth as long as they have enough money to cover their medical expenses and will leave soon after giving birth.
The most important thing is that the intent to give birth is mentioned on the visitor visa application to stay on the right side of the rules.
Practically however, visa officers can deny a visa if they want, and I'm sure most are not big fan of birth tourism. If you want to apply for a TRV again after giving birth in Canada and have the necessary financial resources and have strong ties to your home country, your visa should theoretically be approved. Keep in mind however that the officer reviewing your application can always deny it. The denial may not be technically correct, but as a foreign national you have virtually no recourse to challenge a denial, even if the denial was not made in good faith.The only thing you can do is apply again.