Parents can't be added using that add code as it would register them as Students within your classroom, which requires an account within your domain.
 
If you want to add Guardians for a student then you can setup Guardian email summaries which will allow Guardians to view Upcoming work, any missing work and also other class activity, the steps to add a Guardian are outlined in this help article:
 


About guardian email summaries

A teacher or school administrator can invite a guardian to receive email summaries about their student’s work in class. To get summaries, the student must use Classroom with a Google Workspace account (looks like [email protected]). Email summaries do not include grades.

What’s included in an email summary?

  • Missing work—Work not turned in when the summary was sent.
  • Upcoming work—Work that’s due today and tomorrow (for daily emails) or that’s due in the upcoming week (for weekly emails).
  • Class activity—Announcements, assignments, and questions recently posted by teachers.

Guardians who sign up for email summaries can’t see the Stream, Classwork, People, or Grades pages in Classroom.

How do guardians get summaries?

  1. A teacher or admin sends an invitation to a guardian.
  2. After a guardian accepts the invitation, they choose when to get email summaries for each of their students.

By default, email summaries for classes are turned off. If you’re a teacher, learn how to turn email summaries on.

Tip: All guardians are added to BCC when an email is sent to all guardians.

When do guardians get summaries?

Guardians can get emails daily or weekly and can unsubscribe at any time.

Guardians won’t get an email summary if:

  • There's no activity to report for the given time period.
  • All their student’s teachers turned off notifications for their classes.
  • They accepted the invitation but chose not to get any summaries.
  • They aren't connected to any student in Classroom.

See what an email looks like