I had exactly the same issue, when I recently updated to Docker Desktop 4.39. Version 4.40 did not work either. After trying out different things, the only workable solution I found was to downgrade to an older version.
Finding the older Docker.dmg wasn't straight forward, but this page is helpful. It lists the download links for some older Docker.dmg files and in the end of the page there is a python script to search for newer ones.