Great question.
And yes. a upward box (model 425 or 350) works great but has to be installed higher to capture the height of the new exhaust of the dryer. These two models work great for aluminum or wire/foil flex but it is critical to locate the receptacle so that the flex is stored from top to bottom (use the entire cavity).
Another option is to use the model 480 Dryerbox as it is large enough to encompass both the outlets of a floor standing dryer and a dryer on a pedestal.
https://www.youtube.com/watch?v=6RqemwAu6i0