Preheat the oven to 350°F (175°C). Lightly coat a rimmed baking sheet with nonstick cooking spray.
In a large bowl, combine the flour, oats, baking soda, and salt. Set aside.
In a separate mixing bowl, beat the softened butter, brown sugar, and granulated sugar until light and fluffy.
Add the eggs one at a time, mixing well after each addition.
Blend in the peanut butter and vanilla extract until smooth.
Gradually add the dry ingredients and mix just until a soft dough forms.
Transfer the dough to the prepared baking sheet. Lightly grease your hands and press the dough into an even layer covering the pan.
Bake for approximately 12 minutes, or until the bars are puffed and just beginning to set. Avoid overbaking to keep the bars soft and chewy.
Remove the pan from the oven and allow it to cool for about 5 minutes.
Drop spoonfuls of the remaining peanut butter over the warm bars. Let it soften for a minute, then spread into a smooth layer covering the entire surface.
To prepare the frosting, melt the butter in a medium saucepan over medium heat.
Stir in the cocoa powder, milk, and salt. Bring the mixture just to a gentle boil while stirring constantly.
Remove from the heat and whisk in the vanilla extract.
Add the powdered sugar and stir until the frosting is smooth. If needed, add a tablespoon of hot water to achieve a spreadable consistency.
Immediately pour the frosting over the peanut butter layer and spread evenly.
Let the frosting set completely before slicing into bars and serving.