This problem usually affects the scanning more than the printing.
Temporary you can delete your printer and reinstall your printer.
In the long run, you can go inside your wifi router and reserved a ip address for your printer (this is called DHCP reservation). It means the wifi router will assign a single ip address to your printer and this ip address will never change.