Do you have some source for that distinction? The thesaurus I use says basically that 学生 is mostly for university students (same as indicated here) and that 生徒 is more for students at lower levels, but that people don't really care that much in everyday conversations.
https://dictionary.goo.ne.jp/thsrs/9751/meaning/m0u/%E7%94%9F%E5%BE%92/
The distinction between "生徒" and "学生" in modern Japan is generally divided by location, time, and situation.
"生徒" is a person who is on the premises or facility of a school (or cram school) and is spending time studying right now.
"学生" refers to a person who has the right to become a "生徒" but is not exercising it now.
"学生", who is playing in the city or at home after school, goes to school when that time comes and becomes "生徒".
However, the distinction between "when walking to school" and "when walking home" is ambiguous because it can be interpreted as either "生徒/学生".
In another interpretation, from the teacher's point of view, some people use it properly depending on whether the target is "生徒" at their own school or "学生" at another school.
In general life, there is no problem even if you make a mistake, so the number of people who make a polite distinction is decreasing.
Differences between 生徒 and 学生
Both of them means student in the dictionary. Although, 生徒 means a student who is learning under a teacher and 学生 means a student who is learning under the school.