Very difficult for us to say why your printer is "disconnecting" from your wireless network. Maybe you can tell us more about your environment. Equipment, printer's proximity to the router, etc.
Things to avoid:
Signal strength - printer is beyond the broadcast range of the router, broadcasting through obstructions. Network configuration, using single SSID name for 2.4Ghz/5Ghz broadcast.
The printer can only connect to a 2.4Ghz wireless broadcast
Assign the printer a static IP address. Verify the router is consistently providing the same IP to the printer. This can be checked on the router's admin portal, pinging the printer using Terminal, and/or using a web browser to view the printer's web server.
Since you are using a MAC, you can remove "-" then re-add the printer to Apple menu > Printers and Scanners "+", using its IP address.
Bay Area - CA
~R5C (188.8.131.52) ~Many Lenses ~DxO PhotoLab Elite ~Windows10 Pro ~EVGA RTX 3080Ti FTW3 Ultra
~ImageClass MF644Cdw ~Pixel6 ~6D2 (v1.1.1) retiring