When the school changes its current year, nobody is removed from their chats, so conversations can continue. People who aren't in the new year can keep reading and replying in the chats they're in, but can't start new chats or add people. In a group chat, they're marked (no longer enrolled), and the person who started the chat or a school admin can remove them.
When a family leaves the school during the year (all of their students are removed from their homerooms), the parents are removed from the school's chats. The same happens when a teacher or staff member's last position in the current year is removed. The messages they sent stay in the chats.