Preheat oven to 350°F. Spray a 9×13-inch baking dish with nonstick cooking spray and set aside.
In a large mixing bowl, combine the thawed potatoes, melted butter, shredded cheddar cheese, and sour cream. Stir well to combine, then set aside.
In a medium skillet over medium heat, melt the butter. Add chopped onion and cook until translucent, about 3 to 5 minutes. Add the minced garlic and cook for 1 more minute, stirring frequently.
Add the flour, kosher salt, ground black pepper, cayenne pepper, and dried mustard to the skillet. Stir constantly and cook for 1 minute to form a roux.
Slowly whisk in the whole milk, stirring until the mixture is smooth and starting to thicken.
Gradually add the chicken broth, continuing to whisk until the sauce is thick and bubbly, about 2 to 3 minutes.
Pour the sauce into the bowl with the potato mixture. Stir until everything is evenly combined.
Transfer the mixture into the prepared baking dish, spreading it out evenly with a spatula.
In a large microwave-safe bowl, melt the butter. Add the corn flakes and gently toss to coat the cereal in the butter.
Sprinkle the buttered corn flakes evenly over the top of the potato mixture.
Bake for 40 to 50 minutes, or until the top is golden brown and the edges are bubbly.
Remove from the oven and let rest for 5 to 10 minutes before serving.