Preheat the oven to 350°F (180°C). Grease and flour a 9×13-inch cake pan. For a layer cake, line the bottoms of the cake pans with parchment rounds, then grease and flour the sides.
Sift the cake flour, baking powder, baking soda, and salt into a medium bowl. Whisk together and set aside.
Combine the buttermilk and freshly squeezed lemon juice in a small bowl. Whisk with a fork and set aside.
In a large bowl, beat the softened butter, granulated sugar, and lemon zest for 2–3 minutes, until light and fluffy.
Add the vanilla extract. Beat in the eggs one at a time, scraping the sides and bottom of the bowl after each addition.
With the mixer on low, beat about one-third of the flour mixture into the butter mixture. Add half of the buttermilk and lemon mixture and mix briefly.
Scrape the bowl, then repeat with another one-third of the flour mixture followed by the remaining buttermilk mixture. Finish with the last one-third of the flour mixture. Mix only until combined; do not overmix.
Toss the blueberries with 2 teaspoons of flour. Gently fold them into the batter using a spatula.
Pour the batter into the prepared pan or pans and smooth the top.
Bake the Lemon Blueberry Cake for 30–35 minutes in a 9×13-inch pan or approximately 25–30 minutes for layer cakes. The top should be set and slightly springy, and a toothpick inserted into the center should come out clean.
Let the cake cool completely in the pan. If making a layer cake, allow the layers to cool fully before handling them. Do not invert hot cake layers.
To make the frosting, beat the softened butter until smooth. Add the cream cheese and mix until creamy.
Add the lemon juice and 3 cups of sifted powdered sugar. Start mixing on low speed, then increase to medium once incorporated.
Continue adding powdered sugar about 1/2 cup at a time until the frosting reaches your preferred sweetness and thickness. If it becomes too thick, mix in whipping cream, 1 tablespoon at a time.
For a 9×13-inch cake, spread the frosting evenly over the cooled cake. Decorate with extra blueberries and lemon slices if desired.
For a layer cake, refrigerate the cooled layers briefly so they become easier to handle. Trim any domed tops with a serrated knife. Place one layer on a cake stand, spread with frosting, and repeat with the remaining layers.
Apply a thin crumb coat around the cake and refrigerate for 20–30 minutes. Finish with the remaining frosting and decorate with blueberries if desired.
Slice with a thin, sharp knife and serve