Custom block save does not match due to stripped slashes from br tag and added figure tag around images

The error which is shown by WordPress graphically is not the same output that you actually get from the block.

Open up the browser’s console, and you will see the actual expected and outcome.

Do a quick diff between the two outputs and you should be able to find your mismatch.

The break tags and figure wrapping of images only occurred in the UI error and not in practice.