For me it works if I add some workbenches to FreeCAD's black list. Start FreeCAD in the release mode and right-click on the main window. In the context-menu go to Customize and then open the tab Workbenches in the opening dialog. The deactivated workbenches are: <none>, Complete, Arch, Draft, Image, OpenSCAD, Plot, Robot, Ship and Web.
Close the release version. Now when starting the debug version it works without problems. Only when exiting it I get this error dialog.
Btw, I think there is a bug in Python 3.7 because for some older builds I can use Python 3.6 in release and debug version without these problems.