The bug
When the rotation arguments are changed for a structure block (because you edited it in load mode before) the selection box in save mode is affected by these arguments. However the structure that is saved and showed invisible blocks ignore the rotation values.
How to reproduce (Saving a structure)
Use the following command (changed rotation)
/setblock ~ ~ ~ structure_block{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,author:"-",rotation:"CLOCKWISE_90",posX:1,mode:"SAVE",posY:0,sizeX:2,posZ:1,showair:0b,name:"test_structure",sizeY:1,sizeZ:2,showboundingbox:1b}
Place blocks inside the selection box
Save the structure
Load the structure
→ ❌ Not all the blocks are copied
How to reproduce (Showing invisible blocks)
Use the following command
/setblock ~ ~1 ~ minecraft:structure_block{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,rotation:"CLOCKWISE_90",posX:0,mode:"SAVE",posY:1,sizeX:3,posZ:0,integrity:1.0f,showair:1b,sizeY:1,sizeZ:2,showboundingbox:1b}
→ ❌ Observe that some showed invisible blocks are not inside the selection box
I've had a similar issue. When you try to load in a structure block with a different rotation, it dosen't update it relatively. For example, if your structure is a 3x3 as follows (I represented this using characters):
x x x
x X x
x x x
The capital "X" is the centre of the structure. When you rotate it, its no longer the centre, even though you have set the relative coordinates there before.
Please fix this! It would allow me to add more diverse, rotatable structures in the world through my Dynamo command block machine without having them cut into mountains or trees, which makes me cringe because mountains sliced like cake look so ugly... :S