Even if you successfully get a visit visa which may only be a single entry visa there is no guarantee on arriving in Canada that you will be authorised to stay more than a couple of weeks legally so possibly not even long enough for a birth. Even following a birth there is no guarantee you would be able to extend your stay as a visitor beyond your original authorised stay.
You will not be allowed to work so be prepared to not only pay for birth costs but also accomodation, food and transport which should not be under estimated.
If you state in your visit visa that your only intention is to give birth in Canada then it is possible to expect the application may be refused, but this would be the same for any country if that were the sole reason for an application given birth tourism is not looked upon favourably by any country.
As said before having a baby in Canada gives the mother or father no rights in the country.
The government as per below is actively considering various options which may be adopted in future to restrict granting citizenship automatically.
http://policyoptions.irpp.org/magazines/november-2018/hospital-stats-show-birth-tourism-rising-in-major-cities/