Will vinegar and baking soda still react if the is baked into a pastry?

No, baking soda and vinegar will not react if they are baked into a pastry.

The chemical reaction between baking soda and vinegar, which produces carbon dioxide gas and causes the mixture to fizz and foam, requires the two ingredients to be in liquid form. When baking soda and vinegar are added to a pastry dough and baked, they are surrounded by solid flour and sugar particles. This prevents them from coming into direct contact with each other and reacting.

Additionally, the high temperatures of the oven during baking can cause the baking soda to decompose, releasing carbon dioxide gas prematurely, which means there won't be any reaction left to occur when the vinegar is added.