Preheat the oven to 350 degrees Fahrenheit. Spray an 18 x 13-inch baking sheet with nonstick cooking spray.
Add 2 cups all-purpose flour, 2 cups granulated sugar, 1 teaspoon baking soda, 1 teaspoon cinnamon, and 1 teaspoon salt to a large bowl and whisk to combine.
In a medium saucepan, bring ½ cup unsalted butter, ½ cup shortening, ⅓ cup unsweetened cocoa powder, and 1 ¼ cups Dr. Pepper to a boil over medium heat. Stir frequently so it doesn't heat to quickly and scorch.
Pour the hot mixture over the flour mixture and whisk to combine. Add ½ cup buttermilk, 2 large eggs, and 2 teaspoons vanilla extract and mix until combined.
Pour the batter onto the prepared baking sheet and tap the pan on the counter a few times to pop some of the larger bubbles in the batter. Bake for 18-20 minutes, or until the center of the cake springs back when gently pressed.
Frosting
In a small saucepan over medium heat, add ½ cup unsalted butter, ¼ cup Dr. Pepper, 2 tablespoons whole milk and ¼ cup unsweetened cocoa powder. Heat until the butter is fully melted, stirring frequently so it doesn't heat too quickly and burn. Whisk until smooth.
Remove from heat and whisk in 3 ½ cups powdered sugar and 1 teaspoon vanilla extract. Stir until combined and smooth. Pour the frosting over the warm cake and spread quickly before it sets. Top with 1 cup chopped toasted pecans if desired.
Notes
Texas sheet cake is traditionally baked in a half sheet pan, yielding thinner slices. If you want thicker slices, you can bake Dr. Pepper Sheet cake in a 9 x 13-inch pan. You will need to increase your baking time to 30 minutes or until a toothpick comes out clean.