Thank you ! The trick is that the door can't close itself while your tail is blocking it, so you can open the door, and hold it open while you go take the purple orb ;)
I think I should have made that clearer, maybe put a textual hint somewhere. Thank you for the feedback !