The issue appears to have been that the same depsgraph is evaluated twice at the
same time. Once by the bake code in a background thread and once by gizmo
related event handler.
This patch fixes it by not running event handlers in locked regions. Generally,
accessing evaluated data while the interface is locked (and thus some baking is
usually going on), is not safe.
Pull Request: https://projects.blender.org/blender/blender/pulls/138806