Preheat oven to 350 degrees F.
Cook penne pasta al dente according to package instructions. Drain and set aside.
In a large skillet or saucepan over low heat, melt the unsalted butter. Add the minced onion and cook until transparent, about 5 minutes. Season with a pinch of salt and pepper.
Add the garlic and cook for another 30 seconds.
Add the flour and stir to distribute evenly. Increase heat to medium and cook for a couple of minutes, stirring continuously.
Slowly stir in the warmed heavy cream in a slow drizzle while stirring constantly to avoid lumps.
Bring the cream mixture to a slight simmer and cook until it thickens slightly.
Season with fresh thyme, oregano, and a pinch of salt and pepper to taste. Stir in the parmesan cheese until melted.
In a large bowl, combine the cooked pasta, 3/4 of the pepperoni, 1 cup of shredded mozzarella cheese, and the white pizza sauce. Gently toss to combine.
Pour the mixture into a greased 9 x 13-inch pan. Sprinkle 1 and 1/2 cups of the remaining mozzarella cheese on top, along with the remaining pepperoni pieces.
Bake for 25 to 30 minutes or until cheese is golden and bubbly. Broil for a few minutes for a golden brown top.
Let it cool slightly, then serve your delicious Cheesy White Pizza Casserole.