I had and issue where O365 Share Mailboxes disappeared after a minute or so. After a bit of googling, I found this solution
Configure one of the following registry subkeys as follows:
HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\Autodiscover
DWORD: ExcludeLastKnownGoodUrl
Value: 1
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\x.0\Outlook\Autodiscover
DWORD: ExcludeLastKnownGoodUrl
Value: 1
Note: The x.0 place holder represents your version of Office (16.0 = Office 2016, Office 365 and Office 2019, 15.0 = Office 2013).
Taken from this MS Technote…..