Describe the bug
If you delete a block that has a connected shadow, and undo that. Blockly is dropping the shadow block entirely.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The undo to return the same block.
Screenshots

Desktop (please complete the following information):
Smartphone (please complete the following information):
Stack Traces
Replace with error stack trace.
Additional context
Possibility related to: https://github.com/google/blockly/pull/3902 (I only suggest that as a good starting point because it's a recent change related to shadow blocks), we should run a git bisect to determine the real root cause.
Ran a git bisect, and indeed #3902 introduced this issue, will dig deeper to figure out why.
@BeksOmega looking further into this, shadow blocks are not respawned when Blockly.Events.recordUndo is false.
Haven't been had a chance to figure out a solution for this, this close to the release. Given programatic setShadow is an added feature this release, I'm going to revert and then revert back after release to give us more time to look into this.