Preheat oven to 200°C. Place puff pastry sheets on a lined baking tray and prick with a fork. Bake until golden and crisp, then cool completely.
For the custard, heat 3 cups of milk in a saucepan until just below boiling point.
In a bowl, whisk together remaining 1 cup milk, sugar, cornflour, cake flour, egg yolks, vanilla, and salt until smooth.
Slowly pour hot milk into the mixture while whisking, then return to the saucepan. Stir continuously over medium heat until thick and creamy.
Place one pastry sheet in a square dish, spread custard evenly over it, and top with the second pastry sheet.
Chill in the fridge until set, then cut into squares. Dust with icing sugar before serving.