As already stated by others, it sounds like you have some antifreeze in you water heater. It will take several fill/emptying to get it out of there to stop the foaming.
The heater should remain in bypass mode until the dewinterization process is done. If not, then some antifreeze can get into the water heater and cause your problem.
In the picture below, the top and bottom valves should be closed and the middle valve open for winterization. This puts the heater in bypass mode. Then after running water through all the lines, close the middle one and open the top and bottom. This puts the water heater in normal mode.
By the way, I always blow out my lines before starting winterization and with the heater drain plug removed. Doing this gets all the water out of the short pieces of tubing between the water heater and the valves. Then I put it in bypass mode and put in the antifreeze.
Hope this helps you out.
🙂Barney
2004 Sunnybrook Titan 30FKS TT
Hensley "Arrow" 1400# hitch (Sold)
Not towing now.
Former tow vehicles were 2016 Ram 2500 CTD, 2002 Ford F250, 7.3 PSD, 1997 Ram 2500 5.9 gas engine