If I had to guess literal magic was involved. Since they were trying to recreate a scene from a book that is proven to affect the course of events and the would-be heroine said the villainess’s line the magic forced Yulia into the heroine’s place.
Its at this point that I hope Miss Banache goes a complete 180 and starts fangirling over Yulia. Given her lifelong prince fantasy, that is highly unlikely tho 😥
The physics of that scene has given me a headache for 3 hours. I settled to the fact that it was probably teleportation magic because that stuff is not physically possible.