Laptop shuts down instead of going to sleep when lid closed EDIT: Updating to Catalina 10.15.6 seems to have resolved the issue, at least so far.  Only had it installed for one evening so I'm not 100% ready to say the issues are resolved

I have a Macbook Pro 16 inch with Catalina installed.  It's recently started exhibiting the following behaviour when I try to put it to sleep:

When running on battery or standalone AC it sleeps as normal when the lid is closed or when I select sleep from the menu
When connected to an OWC dock it sleeps only if the lid is open when I select sleep from the menu
When I'm connected to the dock with the lid closed the computer shuts down instead of going to sleep when I select sleep from the menu
If I put the computer to sleep when it's docked and then close the lid, it won't wake up until I open the lid

Has anyone else encountered this?  How do you fix it?
The problem seems to have been some kind of issue in OSX 10.15.5.  Upgrading to 10.15.6 appears to have resolved the issue.