At the beginning of a white sauce always cook off the butter and flour over low heat for 1 minute to ensure the finished sauce doesn’t have a “floury” flavour. Remove from the heat before whisking in milk and returning back to the heat to thicken.
This helps stop food sticking. Brush the tin with melted butter or use some baking paper with a little butter on it to rub around the inside of the tin.