I've struggled with the same issue for months (Office 365, Win 11, wired desktop PC) and what I read seems to lean towards mostly network issues after wake from sleep.
This morning I tried running a couple of commands from the CMD prompt (i.e. Start -> cmd).
ipconfig /release
ipconfig /renew
Basically these disconnect/reconnect your network connection.
My Outlook was already open and unable to get new mail before doing these commands, but once completed new mail came to inbox.
I agree we as customers of Microsoft Office should not have to deal with this type of issue, but for now I'm going to write a batch script to do these commands for me until it gets resolved.
Hope someone finds this useful.
Turning off Wi-Fi and Restarting (cycle Wi-Fi off/on in tray) fixed it for me and sure ipconfig release renew would do the same.
New info: When Outlook would not connect after being idle for some time, I noticed when checking Outlook's connection status (hold down CTRL key and right click on Outlook icon in tray) it listed an authentication error with my mail accounts. Keeping that in mind, I did find something which seems to have helped when trying to solve a problem with another app "iCloud" having authentication issue. It has to so with a prioritization engine for Killer wi-fi. Most folks in this thread seems to have Dell's which may use Killer wi-fi, especially the XPS line. There is a setting in the Killer Control center to turn this off. I did not have the Killer Control center on my machine so went to Dell's web site under support (Drivers and Downloads) and installed the Killer controller center. I think it was listed under additional apps. Once installed you can navigate to "Settings" menu item bottom left and turn off the Killer prioritization engine. Once I did that iCloud worked and my Outlook connection problem after idling went away.
Hope this helps other Killer Wi-Fi users experiencing the same problem.