The Constitution doesn't say that you have to count every illegal immigrant, it says every free person. Illegal immigrants being counted in the census varies from state to state because it's a voluntary act. If you're an illegal immigrant living in lets say Illinois, California or Colorado then you don't mind filling out the census because identifying as an illegal immigrant is low risk(sanctuary state) and the blue state appreciates getting more seats.
If you're an illegal living in states like Alabama, Florida and Utah you might not fill out the census form because they might use census data for ICE immigration enforcement so those states don't benefit from illegal immigration.
This has needed to go to the supreme court for a while. The term "free persons" at the time of writing was understood as a person who was a non-slave nor an American Indian but today that's anyone not in chains. The term "free persons" needs to be updated to citizen/citizens.