Modify custom block plugin without losing content

To prevent this kind of error whenever you change the block structure, I suggest using Dynamic Block instead. You can read more about it here.