For the cake: Preheat the oven to 350 degrees F. Butter a 9-by-13-inch baking dish.
Whisk together the flour, baking powder and salt in a medium bowl.
Combine the butter, oil and granulated sugar in a large bowl and beat with an electric mixer on medium-high speed until light and fluffy, about 3 minutes. Add the eggs, one at a time, beating well after each addition. Using a rubber spatula, scrape down the sides of the bowl as needed. Beat in the vanilla and vinegar.
Add the flour mixture in 3 batches, alternating with the milk, beating on low speed until just incorporated. Scrape the sides of the bowl as needed.
Transfer the batter to the prepared baking dish, spreading and smoothing the top with an offset spatula. Bake until a toothpick inserted into the center comes out clean, 40 to 50 minutes. Cool the cake completely on a wire rack.
For the frosting: Combine the cream cheese and butter in a large bowl. Beat with an electric mixer on medium-high speed until soft and fluffy. With the mixer on low speed, add the confectioners' sugar 1/2 cup at a time, beating until smooth, then beat in the vanilla.
Spoon the frosting onto the cooled cake and spread it evenly with an offset spatula. Garnish with fresh berries if using. Cut the cake into squares and serve.