For PGWP you need to be actively pursuing your studies . https://www.canada.ca/en/immigratio...dents/study-permits/assessing-conditions.html
All leave of studies are considered case by case . But always remember any leave from studies would have to be approved by the University and the circumstances would ve needed to be explained . Moreover please remember you cannot work at all during leave from studies , which will certainly make you ineligible for PGWP.
Post Feb 2019, authorized leave from DLI are allowed to be eligible for PGWP on case by case basis . Your leave should be authorised by the University and you should not be working part time or full time during the said authorised leave