Printer keeps going offline
I have an HP OfficeJet Pro 9015 printer that I've been using, without problem, for over a year. Starting three days ago, the printer keeps being unavailable. When I go to Printers & Scanners in Preferences, it says that it's offline. I've now gone through three cycles of uninstalling, and resetting the printer, and reinstalling it. It then works for a while, but after a few hours it says that it's offline again. The HP Smart App claims that it's online, and I can print on it using the HP email method. I'm running OSX 12.3, but the last update was a few weeks ago. Does anyone have any suggestions?
iMac 21.5″, macOS 13.1