Heat the oven to 200°C / 400°F (180°C fan). Line a large baking tray with parchment paper.
In a small bowl, mix the butter, garlic, parsley, Italian seasoning, salt, and chili flakes until it's a smooth paste.
Lightly flour your counter and unroll the pastry. Spread the garlic butter evenly across the whole sheet, right to the edges. Sprinkle the mozzarella and parmesan over the top and press down gently so it sticks.
Roll the two long sides toward the middle until they meet, like closing a book. Press lightly. Wrap in cling film and chill for 10 minutes so it slices cleanly.
Cut into slices about 1.5 cm (½ inch) thick. Lay them cut-side up on the tray, 4 cm (1½ inches) apart, and brush with the beaten egg.
Bake for 18–22 minutes, flipping halfway, until deep golden brown and puffed, with crispy cheese at the edges. If the bottoms still look pale, give them another 2 minutes.
Cool on the tray for 5 minutes. They'll be molten inside. Serve warm.