Google Classroom is generally managed by the School’s IT. Your setup is strange if they request public gmail account and not internal account in the school tenant.
Your teacher is correct in not being happy. Giving their personal email to a student is… problematic
Remember that your privacy is already breached when a 3rd party in the communication is using gmail
Simply create a burner gmail account and do not use that for anything else than inside your school’s google ecosystem
Google Classroom is generally managed by the School’s IT. Your setup is strange if they request public gmail account and not internal account in the school tenant.