the foam could be returning air.
The cooling system is self-bleeding.
This works via a "jiggle" valve. A jiggle valve normally is a ball that seals of for water. The ball is lighter than water and heavier than air.
So when some trapped air is assembled, it will let that through, but when it is followed by water, the ball is lifted and seals the line.
As you get small amounts of air through, it can fizzle, and if there is a "soap" or cleaner in the system, it can create a foam of fine bubbles.
That would be my take on this.