Liquid fillings are typically piped into pastries after baking, like with donuts, eclairs, and cream puffs.
The method you used relies on crimping and sealing the dough with a long seam in contrast to a single hole, giving the potential for leakage from a seam failure along the entire length of pastry.
The filling itself is rich in fats from the peanut butter and cream, which can also interfere with the dough bonding to itself if smudged along the seam. Additionally, heating from baking reduces the filling's viscosity, making it runnier and able to more easily seep through any small gaps present in the seams.
Chill your filling just enough to thicken it for piping, fill by piping into cooled baked pastries, and if it still leaks out try capping the hole with melted chocolate. If you don't have a piping set, you can improvise with straws and plastic food bags with cut corners.
Copied from comments discussion below:
Sergey Zolotarev: What's wrong with the freezing method? Had I sealed the dough better, would it have worked?
The sealing method would have worked for other types of fillings with lower fat contents like jellies, or using only baking chocolate, some varieties of which have stabilisers added to prevent them from becoming runny when heated. The filling you used has mainly oils and fats with the only water coming from the cream and honey - the fats and oils don't truly 'freeze', and melt and become much more runny at a lower temperature. The dough sealing method does work, just not very well with this specific filling.
Sergey Zolotarev: Isn't it even worse with watery filings? Won't they largely become steam and force their way out, as bob1 pointed out?
For your dough, this would be unlikely. This depends on the composition of the fillings and pastry, broken down into 3 general groups:
- fats and oils
- non-fat solids, i.e. cocoa, milk sugars and proteins, starch
Based on the crumb structure in your pictures, your dough appears to be a leavened high-moisture dough with low fat/oil content. Your filling is a majority non-fat solids (peanut pulp, cocoa solids, and sugars from honey and cream) and fats/oils (peanut oil, cocoa butter, milk fat) with a lesser component of water.
Pastries baked with liquid fillings typically rely on the insolubility of oils and water to keep the fillings from leaking through. This is usually done with high fat/oil content in the pastry and high water content, low fat/oil content in the filling:
- fruit pies, strudels, and tarts with puff pastry made of mostly starch and fat
- cheesecakes with graham crackers bound in fat
- various applications of Greek phyllo pastry
As @bob1 mentioned, steam generated as the filling heats up is an issue, and these types of pastries rely on slits or openings to allow steam to escape since the water is not readily absorbed into the dough. Openings are not an option for your filling, since it is made up predominantly of non-fat solids and oils and fats that do not evaporate, and as stated above, become runnier and flow more easily when heated.
If a primarily water-based, low fat/oil filling were used with your dough, you would have completely different interactions depending on the ratio of non-fat solids to water, and temperature and state of the water present in the filling:
- High solids, low water: similar to a calzone, pierogi, or buchty with proper povidla mentioned by @Colombo, where the free water remains bound in the filling or partially absorbed by the mainly water-based dough.
- Low solids, high water: the use of jam by @Colombo instead of povidla, where the filling will leak as steam as generated. This can be adjusted for in the case of Chinese soup dumplings, as @quarague mentioned, where the water is bound by gelatin.
- Freezing a high water content filling: Additional energy is needed to go from 0C solid ice to 0C liquid before the temperature rises, about the same amount as the energy required to go from 20C to 100C - this is called 'latent heat' required in a phase change. The downside to this approach is that the solid chunk of ice acts as a heat sink in the centre, which may inhibit the dough from generating steam and rising during baking. Your filling is primarily fats/oils and non-fat solids, which do not have the same latent heat capacity as water - coconut oil, with one of the highest latent heat capacities for edible oils at approx. 105 J/g, is 4000x lower than that of water.
Image from "Specific Heat and Latent Heat Capacity of Water." https://geo.libretexts.org/Bookshelves/Oceanography/Oceanography_101_(Miracosta)/07%3A_Properties_of_Seawater/7.02%3A_Specific_Heat_and_Latent_Heat_Capacity_of_Water
Edible Oils as Practical Phase Change Materials for Thermal Energy Storage. Samer Kahwaji, Mary Anne White. http://dx.doi.org/10.3390/app9081627