A loose queen by herself in a box? Assuming ventilation so they don't suffocate and a small box... She will starve quickly. A loose queen with attendants in a box? She will probably fly when you open the box. A queen in a cage with loose attendants in a box? This works well and you can replace the attendants from time to time when it starts to smell like a wet diaper...
A queen in a free flying nuc with some bees? That can work until it fills up.
A queen in a free flying nuc with some bees? That can work until it fills up.