Not necessarily. MA does a pro-ration of income of MA to total Federal income. To see the Form itself, see this link. https://www.mass.gov/doc/2019-form-1-nrpy-massachusetts-nonresidentpart-year-tax-return/download
You do not get all of your MA withholding back. If you work in MA, then MA taxes you on income you earned there. If the state you live in has an income tax, you should get a credit for tax paid to MA. Complete your MA non-resident income tax return first.