Diagnosis
Windows is defaulting to a Wi-Fi Direct or a USB connection profile instead of the main network printer, dropping it when that virtual port isn't active.
How to Fix It
Delete all existing instances of the printer from Windows. Go to Settings > Bluetooth & devices > Printers & scanners. Remove every entry for "HP LaserJet Tank 2604." Then, reinstall using ONLY the HP Smart app—it will set up the correct IP-based queue. Do not let Windows "add a printer" automatically.
If That Didn't Work
Your router's IP lease time may be too short. In your printer's network settings (touchscreen: Setup > Network Setup > View WiFi Details), note the IP address. On your PC, add the printer manually using a Standard TCP/IP Port with that exact IP.
Heads Up
The "HP Smart" app must remain installed and running in the background on at least one network device to handle printer discovery and driver updates reliably.