I'm guessing that the effect of entrapped O2 in the foam is minmal. FWIW, the foam stays on top of the beer and most of it is removed during the racking process and then you pressurize with the more dense CO2 and that forces the foam and air to the top of the keg. You purge, and voila, no air or O2. I wouldn't and don't worry about it.