Add 2½ cups of whole milk and the sweetened condensed milk to a medium saucepan. Whisk until smooth.
In a small bowl, whisk the remaining ½ cup of milk with the cornstarch until smooth.
Add the cornstarch mixture, egg yolks, and salt to the saucepan. Whisk well.
Cook over medium heat, whisking constantly, for 8 to 10 minutes or until thickened and gently bubbling.
Remove from the heat. Stir in the butter and vanilla extract.
Transfer the cream to a bowl. Press plastic wrap directly against the surface and cool for 20 to 25 minutes.
Whisk in the heavy cream until smooth.
In a shallow bowl, whisk together the milk, cocoa powder, sugar, and vanilla extract for dipping the cookies.
Spread a thin layer of cream in the bottom of a 9×13-inch dish.
Dip cookies quickly into the chocolate milk mixture and arrange them in a single layer over the cream.
Spread one-third of the cream over the cookies. Repeat with more dipped cookies and cream, ending with cream on top.
Place the chopped chocolate in a heat-safe bowl.
Heat the heavy cream until steaming, then pour it over the chocolate. Let sit for 3 minutes.
Stir until smooth, then stir in the butter.
Pour the ganache over the pavê and spread evenly.
Cover and refrigerate for at least 6 hours or overnight.
Garnish with chocolate shavings and cocoa powder before serving.