There is a common misunderstanding about study permits. A study permit allows you to study in Canada, but it is not a visitor visa for students.
It is necessary to apply for a visitor visa for students to be able to travel between their home country and Canada without facing any issue.