Hi,
What might be happening is that the printer may be in power saving or sleep mode, thus losing connection because if it's connected via network, the IP address changes when you reconnect to Wi-Fi and loses its reference on your PC.
We can identify it using the autorun function in the printer software.
What is the model of your printer?
Thanks