Prepare the custard while the dough is resting. Mix the cornstarch, all-purpose flour, and half of the sugar together in a small bowl.
Place the egg yolks in a large bowl. Stir a few times to mix the yolks.
Add the milk and the remaining half of the sugar into a small saucepan. Heat over medium heat. Stir occasionally to dissolve the sugar completely. Cook until it reaches about 120 °F/ 49 °C (no more than 150 °F / 65 °C). You might see a few bubbles here and there. If the milk starts foaming, it’s too hot.
While the milk starts to get warm, add the dry ingredients (from step 1 of the custard) into the bowl with the egg yolks. Whisk until it forms an even paste. Do not add the dry ingredients too early, because the sugar will change the texture of the eggs.
Add the warm milk into the egg yolk mixture, about 1/4 cup at a time. Whisk constantly until the milk is fully incorporated into the paste. Continue to add more milk, a 1/4 cup at a time and continuously stirring, until it forms a thin, smooth mixture and all the milk is added.
Return the mixture back to the pot (the one you used to heat the milk). Heat over medium low heat and stir constantly, until the mixture thickens, 5 minutes or so. Keep cooking and stirring, until you can draw a line on the bottom of the pot using a spatula. (Note, the custard will start to thicken suddenly, like a switch was flipped. So you should keep a close eye on it.)
Remove the pot from the stove immediately. Add the butter and vanilla extract. Stir to mix well.
Line a large, deep plate with plastic wrap. Place a large mesh strainer on top.
Pour the custard into the lined plate through the strainer to smooth out the texture. Use a spatula to press the custard through the strainer if any lumps remain.
Cover the custard with plastic wrap. Press the wrap against the custard, so it won’t form a skin once it’s chilled.
Chill the custard in the fridge until it’s cooled, 2 hours or so. Or in the freezer for 30 mins.