Add pistachio nuts, lemon juice, salt, pepper, garlic, and shredded mozzarella cheese in a blender. Blend them for 30 seconds. Remember to not grind them finely and keep them a little coarse.
Add basil leaves, and olive oil, and again blend them for a minute. Pour the olive oil in between to maintain the consistency.
Switch on the flame to low, and melt butter in a skillet. Add chopped garlic, and saute it till golden brown.
Add refined flour, saute till it releases its aroma, and add milk in 3 batches of equal amounts. Whisk properly at each stage to get a lump-free result.
Add mozzarella cheese, salt, pepper, oregano, and red chili flakes, mix them properly, and let it simmer for a minute.
Let it cool down, then mix the pesto with the sauce, and your pesto alfredo sauce is ready to be served.