Heat oven to 375°F. Line a large baking sheet with parchment.
Lightly flour the counter. Cut the puff pastry in half and roll each piece into a similar rectangle, about 10x12 inches.
Transfer one rectangle to the baking sheet. Spread pesto evenly over the surface, leaving a small border.
Sprinkle mozzarella and half the Parmesan over the pesto. Lay the second rectangle on top and press edges to seal.
Using a knife, outline a Christmas tree with a trunk. Trim away the excess pastry and reserve scraps for twists if desired.
Cut horizontal slits to form branches on both sides of the tree. Twist each branch two times to show the filling.
Brush the tree with milk. Sprinkle remaining Parmesan, sesame seeds, salt, and pepper over the top.
Bake 20–24 minutes until puffed and deep golden. Cool 5 minutes before serving.