Preheat the oven to 350°F (175°C). Spray an 18 x 13-inch baking sheet with nonstick cooking spray.
In a large bowl, whisk together the flour, granulated sugar, baking soda, cinnamon, and salt until evenly combined.
In a medium saucepan over medium heat, combine 1/2 cup unsalted butter, 1/2 cup shortening, 1/3 cup cocoa powder, and 1 1/4 cups Dr. Pepper. Bring to a boil, stirring frequently to avoid scorching.
Pour the hot chocolate-Dr. Pepper mixture over the dry ingredients and whisk to combine. Stir in 1/2 cup buttermilk, 2 large eggs, and 2 teaspoons vanilla extract until the batter is smooth.
Pour the batter into the prepared baking sheet and gently tap the pan on the counter to release large air bubbles. Bake for 18–20 minutes, or until the center springs back when lightly pressed.
While the cake is warm, make the frosting: in a small saucepan over medium heat melt 1/2 cup unsalted butter with 1/4 cup Dr. Pepper, 2 tablespoons whole milk, and 1/4 cup cocoa powder, stirring frequently until melted and smooth.
Remove the frosting mixture from heat and whisk in 3 1/2 cups sifted powdered sugar and 1 teaspoon vanilla extract until smooth and spreadable.
Pour the frosting over the warm cake and spread quickly before it sets. Sprinkle with 1 cup chopped toasted pecans, if desired. Let the frosting set before slicing.