Position a rack in the center of the oven and preheat the oven to 375 degrees. Line two baking sheets with parchment paper.
In a medium bowl, stir together the flour, baking powder, salt, and xantham gum.
In the work bowl of a stand mixer fitted with the paddle attachment, beat together the butter, shortening, and both sugars until light and creamy, about 3 minutes. Add the eggs and the buttermilk and beat until combined.
In a small measuring cup, combine the milk, baking soda, and vinegar and add to the batter along with the flour mixture; beat on low until just combined. Add the vanilla and beat on medium until completely combined, about 2 minutes.
Using a spoon, drop about 1 tablespoon of batter onto one of the prepared baking sheets and repeat, spacing them at least 2 inches apart. Bake one sheet at a time for about 10 minutes or until the cakes begin to brown. Remove from the oven and let the cakes cool on the sheet for at least 5 minutes before transferring them to a rack to cool completely.
Make the chocolate buttercream while the cakes are cooling. Then, spread the buttercream on the flat side of one cake and top it, flat-side-down with another cake to form the whoopie pies.