Yes and no. In theory, the game ends when a student gains all the powers available to their character class. Students must reach Level 18 to gain all those powers, making Level 18 the "end of the game," so to speak.
That's why Level 18 often becomes famous among students. Still, even if a student reaches Level 18, the Hero Pact forces them to continue playing until the course is over. So in practice, Classcraft ends when the course does.
You may want to celebrate the finale by throwing an in-class party or by inventing a creative way to conclude the game with your students and reward them for their continuous effort during the school year.