Yes, I don't think you need to keep medical valid throughout your studies in Canada, has to be something else. May be false feedback from airport staff into your data or something mismatched or not aligned with your study permit conditions. Find out through IRCC.