Disassembling Links using X (or the D-pad) on the right frame when exiting or entering a GBA screen will cause the non-green Links to be in an out of bounds state.
After Green's animation of walking through an entrance is finished, pressing X on the first frame you gain control will perform this glitch. This is a one frame trick, so doing it with mashing or ample practice is advised. Doing different formations when entering these screens can cause different sequence breaks.
After a successful OoB, you can select the now invisible Links and reunite with L/Y or any C-Formation to move to the current position of the selected Link. The position of the Links depends on where they are when you enter/exit the GBA screen.
An example, as well as another explanation can be found here: