Indeed, dress codes that mandate that boys cut their hair shorter than girls probably violate Title IX. There isn’t any rational justification, short of discrimination based on sex (which Title IX prohibits in school), to force boys to have different hairstyles from girls. A similar issue arose in Texas a few months ago when a school tried to force a boy not to wear nail polish in school even though girls are allowed to.
The boys sued with the help of the ACLU, and the school board changed its policies PDQ. They were in violation of federal law, and they knew it.
Good for Illinois for being proactive about this!