That’s strange. I was able to renew a work permit in Canada while staying (and continuing work) in Canada. Same for study permit. This was over a decade ago, so perhaps things have changed.
They also were not called visas, but permits. Visa is for entering the country, permit is for staying.