In order to receive a refund of incorrectly withheld NY taxes, you must submit a non-resident NY tax return, showing zero NY income.
Note that if you were a remote worker for a NY employer, NY will consider your income taxable unless you worked remotely out of necessity of the employer, even if you are no longer a NY resident.
Also note that NY considers you a resident for tax purposes if your domicile is still in NY. See this for details on that: https://www.tax.ny.gov/pit/file/pit_definitions.htm#:~:text=Resident,for%20income%20tax%20purposes%20if%3A&text=your%20domicile%20is%20not%20New,State%20during%20the%20tax%20year.
if I zero out the income for NY but I sow the taxes paid turbo tax states that I am showing greater than 25% taxes and can not file my return electronically. so is this wrong or do I just mail it in?