Try this Scalloped Corn recipe.
Why does a corn casserole sometimes separate into an oily layer and a dense mass instead of setting into a uniform custard? The culprit is usually uneven mixing of the dry muffin blend into the high-fat dairy and eggs. Whisking the sour cream, melted butter, eggs, and sugar thoroughly before adding the corn and dry mix ensures that the proteins in the dairy and eggs form a cohesive emulsion. When the dry corn muffin mix enters this wet matrix, the starches absorb moisture gradually rather than clumping. Incorporating these elements at room temperature prevents the butter from solidifying prematurely upon contact with cold eggs.
Setting the oven to 350 degrees F (175 degrees C) provides enough thermal energy to coagulate the egg proteins without scorching the high sugar content present in both the creamed corn and the added sweetener. A 9x13 inch baking dish spreads the batter thin enough to heat uniformly from the edges to the center. Monitor the bake time closely between 35 and 40 minutes. Insert a knife blade into the midpoint of the pan; the dish is ready when the steel emerges clean, indicating the starch network has fully set and trapped the moisture.