The key to getting these puff pastries right is to get the vermicelli kheer to have a thick consistency. Keeping it runny will eventually cause it to leak out of the pastry while it is still in the oven.  To make it thicker, you can keep reducing it on low heat until the volume of the milk reduces by half. You can also add some condensed milk or powdered milk into it.