Maybe it should stay the same from a moral perspective, but that's not how the system currently works in the United States - and, perhaps, most of the world.
No (viable) company in the United States pays for the value of your labor, but for the profit it can have from your labor. They pay you the very minimum they can get away with, and no more, in a complex decision-making process that tries to extract the maximum profit from your labor. Food, benefits, time off etc, it's all part of the goal of maximizing profits from your work.
So considering the above, and ignoring the morals of doing so, no, your pay shouldn't stay the same because that doesn't maximize profits for the company.
After you move, the company will pay you less because you will still be gladly giving them the same work, if not better work, for a smaller salary due to the new and immense benefit of accepting you to work from any place you want.
Now, you can always refuse to accept these terms. Your options: remain in the bay area or go to your new house elsewhere without the job. Would you prefer any of these options to taking the pay cut?
That's what I thought!
PS: possibly one day we'll have such a strong labor market that people in Wyoming can charge top dollar to bay area companies because the companies won't be able to find anyone else to do that job for less. But I think we're not there yet.