To prevent this problem, it is advise the configure the port using Printer Name instead of IP address. It should solve the print fail issue due to IP changed by router (as shown below).
To get Printer Name, you could browse using file explorer for printer name or login to printer properties using internet explorer.