It definitely makes more thematic sense to take the cubes out. Since they represent damage you take during the dragon attack, if you're not in the dungeon anymore then how would you take damage?
When they're in the Clank box, they represent the accumulation of sounds you and the other players made. So I actually think it's more thematic to keep them in.
Imagine the dragon is roaming around, and it becomes aware of the thieves being present, chases down the thieves from the sound that they made - some escaped, some didn't.