It is not mandatory by CGI Toronto website and available official guidelines for photo.
However, when I went to submit my OCI application earlier in January this year, the gentle lady at the BLS counter insisted to get dated photo (some new propaganda for photos). My Family was using exact same photos (600x600 px, 51x51mm) used for their surrender certificate 4 weeks back and there same photo was on Canadian passport too but they wanted to make money with their shitty behaviour. After bit of arguments, I had to sign an undertaking for my own liability for rejection of application.
Eventually, I got OCI with my photo which I clicked at home with iPhone (changed from surrender certificate) and printed at Walmart after using some of my photoshop skills.
There's no harm of getting dated/stamped photo, if you are getting a new set of photo. Otherwise, it is not mandatory but be ready for photo harassment by BLS.
https://www.cgitoronto.gov.in/docs/1626187593Photograph Guidance for Applicants.pdf