Can I have cross database or cross server references through a relative path?
Assuming that, post migration, you have absolutely no other need for this Linked Server to Server 1, then you should be able to drop and recreate it with the same name but pointing to the current / local instance (i.e. Server 2). This is known as a "loop back" and will allow the code to continue working unmodified.

HOWEVER, that is a short-term solution as you don't want to go through a Linked Server if you don't need to. You should go through all of the code and remove the [Server1]. references. This loop back Linked Server is just a means of buying time to do these changes slowly rather than needing to have it all done up front.