Would be interesting to hear the answer if anyone knows it.
I live in MA and, when I worked in NH, I had to pay MA income taxes because I live here even though NH has no state income tax. Now I work for a company with offices in MA (even though that's not where the official HQ is) so I still pay MA taxes; doesn't matter if I'm remote or not. Were I to move to NH and work remotely, my understanding is I would then not pay state income tax (although I would if I were assigned to an MA office).