During the ending animation, holdleft and X to buffer a melee left. Don’t mash it or try to time it or you wont be guaranteed to be in the right position at the end of the setup!
During the melee animation, hold L
Give yourself a moment to settle after the melee
Flash right and quickly pause. You can do this by continuing to hold L and holding right on the stick, then in quick succession press A to flash and + to pause.
Zoom in on the pause screen and inspect your position. Observe how the bump on the left side of the helmet is overlapping the door. If you are too far left, advance frames until you reach this point. Each frame will shift you about half a helmet’s width over. If you are too far right, abort and restart. If you are slightly off from this, your previous steps were off somehow.