1Preheat oven to 400 degrees F (200 degrees C). Prepare a 9x13-inch baking dish with cooking spray.
2Spread one of the puff pastries into the bottom of the prepared baking dish, stretching so it reaches the edges.
3Bake pastry in preheated oven until lightly browned, about 5 minutes.
4Beat egg yolks in a stainless steel bowl until smooth. Add macapuno strings, softened butter, and vanilla to the egg yolks; stir.
5Place the stainless steel bowl over a pot of boiling water; cook the macapuno mixture, stirring frequently, until it thickens, about 5 minutes. Pour over the baked puff pasty and spread into an even layer. Stretch the unbaked puff pastry over the top of the macapuno layer.
6Bake in preheated oven until top layer is golden brown, about 18 minutes. Cool to room temperature.