“Domicile” also counts. State tax law often considers where the worker’s true home, known as domicile, is in addition to time spent in-state. Key factors include where someone votes, has club or religious affiliations, has a driver’s license, and plans to be buried.

Mr. Klein says aggressive, high-tax states like California and New York are likely to assert that high earners who left during the pandemic and later return owe 2020 tax because they didn’t change their domicile.

Adjust state withholding or estimated taxes. If you suspect you’ll owe more tax than you anticipated, consider upping your withholding or making larger estimated tax payments. Paying in too little during the year can trigger interest and penalties at filing time in 2021.

Get professional help. If lots of tax is at stake—say, if you’ve received a big bonus or sold a key investment while working remotely out-of-state this year—think seriously about getting professional help before year-end, while there’s time to make smart moves. It could save a bundle.