This happens when the transmission is over full and the fluid gets whipped inside the foam by the rotating parts of the drums/shafts or one of the filter O rings is leaking. I would service the unit and refill it with the correct amount of fluid. Here is a guide to help.
https://www.2carpros.com/articles/how-to-service-an-automatic-transmission
AUTOMATIC TRANSMISSION FLUID CAPACITY
Bottom Pan Removal (requires drain plug removal) .................... 7.0 liters (7.4 quarts)
Complete Overhaul (with existing converter) .................... 12.0 liters (12.6 quarts)
Dry .................... 14.2 liters (15.0 quarts)
Check out the images (below). Let us know what you find.
Images (Click to enlarge)
Feb 25, 2015 at 12:27 PM