Carousel opening on a separate "window"/layer

I have followed a tutorial on how to make a carousel and its came out looking nice and smooth. Unfortunately once i place a copy of it in the actual page design frame and click the scroll arrows it opens up in a separate layer instead of staying as part of the page design. Im losing my mind with frustration over, has anyone got any ideas where i’m going so wrong?
I hope ive explained this well enough, i have attached pictures to help explain more.