The biggest culprit of grainy mac and cheese is allowing the roux to curdle. To prevent this, do not let the roux come to a boil when you add the milk and heavy cream to the flour and butter mixture. Boiling can cause milk to separate. All we need is a simmer.