There should be a Snopes-style forum on CC for debunking college-related urban legends, as well as misconceptions that well-meaning people are carrying from prior generations.
Different states have different rules. Different schools in a given state can have different rules. OP’s friend has anecdotal evidence of a single instance that has no relevance to anyone else (since we do not know what state and school are involved). There was a question a few months back about Florida (I think), and I was actually astounded to see that the rules probably made the kid a resident. The facts would not have done so in California. No one can answer this question for all states and schools. No one should try.
^^abouttesame summed it up best. But I will ad - once you know the rules for the school, don’t try to skirt them, or intepret them to your advantage. The schools have no patience for this. My S1 shared with me last year about a kid in his dorm that had done this and got caught. The school did not go after back tuition, as far as I know, but it did make the school unaffordable and messed up college plans pretty well.
You just have to be an illegal immigrant to get in-state tuition.
^ Except… no, not really. In a very few states in specific circumstances.