I believe you are missing the rotate/mirror functions. I believe that these are called when the structure is generated and is being rotated. I got these from the StairsBlock.java class.
public BlockState rotate(BlockState state, Rotation rot) {
return state.with(FACING, rot.rotate(state.get(FACING)));
}
public BlockState mirror(BlockState state, Mirror mirrorIn) {
Direction direction = state.get(FACING);
StairsShape stairsshape = state.get(SHAPE);
switch(mirrorIn) {
case LEFT_RIGHT:
if (direction.getAxis() == Direction.Axis.Z) {