Adjust oven rack to lower-middle position and preheat oven to 200C/ 390F.
Generously grease a 12"/ 30cm round cake pan with ghee or butter. (This can also be made in a muffin pan)
Over a large bowl, shred the kunafa dough into 1inch/ 2.5cm long pieces. Cutting the kunafa while semi frozen, makes for the easiest way to break it. So even if using fresh kunafa, put it in the freezer for about an hour before cutting it. Just be sure to bring it back to room temperature before adding in the ghee/butter.
Pour the melted ghee/butter evenly over the kunafa and mix evenly with your hands, into the kunafa shreds, making sure that each strand is well-coated.
Transfer two-thirds the amount of kunafa into the prepared pan and evenly spread it onto the bottom and up the sides. Make a wall with the kunafa around the sides of the pan; this will help contain the filling during the baking process and prevent it from burning. Use the flat-bottom of a cup to compress the kunafa as tightly as you can.
Spoon the cheese filling over the kunafa and gently spread into an even layer.
Scatter the remaining third of the kunafa over the cheese filling, and lightly press on it to tidy it up and get it nice and level.
Transfer the pan to the oven and bake for 40 to 45 minutes, or until the top and sides of the kunafa are deep golden brown in color. Use a knife to push the side of the konafa, to check the color. The longer it bakes, the crunchier it gets.
Remove the kunafa from the oven and immediately pour on the scented syrup, starting from the edge and moving towards the center, in a circular motion, making sure to cover the entire surface.
Let the konafa rest for 5 to 10 minutes to allow for the syrup to soak in, then flip on to a serving platter. Garnish the surface with pistachios and dried rose petals, if you like.
Cut into wedges and serve hot or at warm room temperature. Kunafa is best enjoyed warm, and on the same day it's baked. Leftovers maybe stored in the refrigerator, then rewarmed in the oven or microwave.