You are dealing with three issues in this question.
Will you meet the requirements of the loan? Many mortgages require that you within a short timeline make the property your principal residence. They don't want you to turn it into a rental property. They don't want it to be a vacation home.
So one don't rent it out. Transfer all your identity to the property. I doubt that they will ask you to prove you are spending x nights a month there.
Some states did/do have programs for mortgage assistance (lower rates or lower down payments), if you are using one of those programs make sure you meet the requirements of the program.
Pennsylvania will want a chunk of income taxes from you. New York will want a chunk of taxes from you. New York will claim the taxes because you work in the state. NYC will also want a share. The good news is that PA will credit you for the taxes you pay to NY. So it might not cause a real change in your state income tax situation. But you will now be filing tax forms in both states.
NY taxes you because that is where your work, so your employer will be withholding money from your paycheck and sending it to NY. In some other pairs of states it goes to where you live (DC/MD/VA for example). So the fact that you are a resident of PA, isn't a major issue.
Health insurance can be an issue. If the plan makes you pick from a network of doctors or even specify a specific doctor as your primary care physician you have to determine how this will work when you are 140 miles away from your employer on a regular basis.
Neither of those is an issue for your employer. They don't put your job at risk.
The only way to do that is if there is a job requirement. Must be able to respond to an onsite emergency in 2 hours; must be a resident of state/city/county x. Those types of jobs are rare, but they do exist.