I had a similar problem when I set up new Windows 11 machine. Printer (Canon G7040 specifically, connected through WiFi, on different network) was constantly offline, could not be made online and I was unable to auto start it (i.e. wake turned off printer with print request). What puzzled me was that I was still able to scan through IJ Scan Utility, even waking up the printer/scanned from sleep to start scanning.
It worked all as expected on Windows 10 machine. Which was on the same network as Win11 machine, both different from printer network (i.e. PCs were on 10.10.0.0 network while printer resided on 192.168.1.0 network). Since scanning worked, I ruled out routing/infrastructure as a source of the problem. Then I compared port settings on both machines (access it through Printers & scanners -> YOUR_PRINTER -> Printer properties -> Ports tab -> Configure Port) and on Windows 10, printer had "SNMP Status Enabled" unticked (disabled). On Windows 11 it was enabled. So I disabled it and viola - printer now operates as intended.