Preheat the oven to 350 degrees F.
Butter and flour an 18 by 13 by 1 1/2-inch sheet pan.
Cream the butter and sugar in the bowl of an electric stand mixer fitted with the paddle attachment on high speed, until light and fluffy. On medium speed, add the eggs, 2 at a time, then add the sour cream and vanilla. Scrape down the sides and mix until smooth.
Sift together the flour, cornstarch, salt, and baking soda in a bowl. With the mixer on low speed, add the flour mixture to the butter mixture until just combined. Pour into the prepared pan. Smooth the top with a spatula. Bake in the center of the oven for 20 to 30 minutes, until a toothpick comes out clean. Place on a cooling rack and let cool to room temperature.
For the frosting, combine the butter, cream cheese, sugar, and vanilla in the bowl of an electric stand mixer fitted with the paddle attachment, mixing just until smooth.
Spread three-fourths of the frosting on the top of the cooled sheet cake. Outline the flag on the top of the cake with a toothpick. Fill the upper left corner with blueberries. Place 2 rows of strawberries or raspberries across the top of the cake like a red stripe. Put the remaining icing in a pastry bag fitted with a star tip and pipe two rows of white stripes below the strawberries or raspberries. Alternate rows of strawberries or raspberries and icing until the flag is completed. Pipe stars on top of the blueberries.