Depends on the state and your income bracket. The state can determine from credit card receipts and other financial records where you've been. But it's unlikely that they will make the effort unless you pay a lot of taxes. There are some real horror stories out there, mainly from CA, IL and NY of the extremes they will go to pursuing someone.
"A California resident is anyone in the state for other than a temporary or transitory purpose. It also includes anyone domiciled in California who is outside the state for a temporary or transitory purpose. The burden is on you to show that you are not a Californian. If you are in California for more than 9 months, you are presumed to be a resident. Yet if your job requires you to be outside the state, it usually takes 18 months to be presumed no longer a resident."
ForbesNew York and California, collecting income taxes from individuals who are unable to prove that they did not cross the 183 day threshold has become a big revenue driver. New York, for example, collected $1 billion from residency audits from 2013 – 2017, which is 4 times more than S Corp/Partnership audits.
resdency audit