Preheat your oven to 350°F (175°C).
In a food processor or blender, combine the soaked and drained cashews, soaked and drained almonds, plant-based milk, granulated sugar, vanilla extract, lemon juice, and water. Blend until you achieve a smooth and creamy consistency. Set aside.
Place the shredded phyllo dough in a large mixing bowl. Pour the melted vegan butter over the dough and mix well, ensuring all the strands are coated.
Grease the bottom and sides of a 9x13-inch baking dish with vegan butter. Spread half of the shredded phyllo dough evenly on the bottom of the dish, pressing it down gently.
Pour the cashew-almond mixture over the shredded phyllo dough in an even layer.
Cover the filling with the remaining half of the shredded phyllo dough, pressing it down gently.
Bake in the preheated oven for about 30 minutes or until the top is golden brown and crispy.
While the kounafa is baking, prepare the syrup. In a saucepan, combine the granulated sugar, water, lemon juice, and rose water (if using). Bring the mixture to a boil, then reduce the heat and let it simmer for about 10 minutes until it thickens slightly.
Once the kounafa is done baking, remove it from the oven and immediately pour the hot syrup evenly over the top.
Allow the kounafa to cool for a few minutes before serving. Garnish with crushed pistachios.
Serve the vegan Egyptian Kounafa warm or at room temperature.