This depends on the school. Many schools follow this or a similar guideline:
Classification of students as a non-resident shall be made at the time of their initial admission to the university and the non-resident status shall continue unchanged through all registrations at the university until and unless satisfactory evidence is provided supporting that the student's reason for coming to and remaining in the state has changed.
In other words:
An individual whose presence in the state is based on activities or circumstances that are indeterminate or temporary, such as (but not limited to) educational pursuits, will be presumed not to be domiciled [in-state] and will be classified as out-of-state.
So, look carefully at the regulations for any OOS public schools you're considering.