There is an Update from High Commission of Canada in India on the Medical examination Validity for Student and Worker.
That might be the reason for the Counterfoil Document Invalid.
"Students & Workers :
You must have a valid medical examination prior to travelling to Canada. If your medical has expired, your visa is not valid for travel. Your medical exam results are good for 12 months only from the date of the exam. More info: https://www.canada.ca/en/immigration-refugees-citizenship/services/application/medical-police/medical-exams/requirements-temporary-residents.html"
That might be the reason for the Counterfoil Document Invalid.
"Students & Workers :
You must have a valid medical examination prior to travelling to Canada. If your medical has expired, your visa is not valid for travel. Your medical exam results are good for 12 months only from the date of the exam. More info: https://www.canada.ca/en/immigration-refugees-citizenship/services/application/medical-police/medical-exams/requirements-temporary-residents.html"