You are getting the error because the expansion works on the preview data which is limited to small subset. When you load the data to the worksheet, the epansion procedure runs over the entire dataset, and I'm sure there are some branches to this JSON that don't conform to the schema that you've showed in your example.
Have a look at other two forum questions that might guide you through troubleshooting the error.