The issue is the statement the kid made went well-beyond merely making a political statement.
Once he personalized it towards OP’s D by saying SHE should be deported, that crosses the line from making a political statement into making a personal racist attack which would be a violation of many high school conduct codes regarding racist behavior, harassment, etc.
If he had merely said all illegal immigrants should be deported, THAT would have been a political statement.
Recent Supreme Court rulings have found that while students have First Amendment rights, it is more limited than the general public at large as the public schools have a compelling interest in enacting limits in the interest of fulfilling their mission of providing a safe secure environment conducive and that “consciously or otherwise, teachers—and indeed the older students—demonstrate the appropriate form of civil discourse and political expression by their conduct and deportment in and out of class”:
Bethel School District v. Fraser
Hazelwood School District v. Kuhlmeier
Morse v. Frederick
That’s not to say I necessarily agree 100% with the rulings in these three cases. However, these cases do demonstrate how courts have felt the need to allow for school districts to balance their students First Amendment rights with their compelling need to provide a safe secure educational environment and education for K-12 students.