I am trying to plot multiple subplots with shapes on each plot. From the following code below, if I display one plot I get the following plot:

When I position 4 copies of this plot in a subplot I get the following:

As you can see all of the 4 lines that should be drawn one on each subplot have all been drawn in the original position in the top left subplot. Any ideas how I can fix this?
** EDIT - using "paper"
If I use the "paper" for xref and yref in the declaration of my edge shapes the shapes do not scale properly. Maybe I am using "paper" in the wrong context here? I have attached an image below

library(plotly)
library(igraph)
tree <- make_tree(127,2)
tree_layout <- layout_as_tree(tree)
tree_layout_df <- as.data.frame(tree_layout)
Xn <- tree_layout_df[,1]
Yn <- tree_layout_df[,2]
edge_shapes = list(
type="line",
line=list(color="#030303",width=5),
opacity=0.3,
x0 = 0, x1=0,
x1 = 5,y1 = 5
)
reg_tree_plot <- plot_ly() %>%
add_trace(x=~Xn[0:63], y=~Yn[0:63], type='scatter', width=700, height=500)
tree_layout <- layout(reg_tree_plot, shapes=edge_shapes)
x <- tree_layout
y <- tree_layout
z <- tree_layout
sub <- subplot(tree_layout,y,z,x,
nrows=2,
margin=0.05,
shareX=FALSE,
shareY=FALSE)