It isn't soap - it is a betta bubblenest. Sometimes water changes will make your fish create them, but mostly it is an effort to draw attention....for mating
Begs the question, why does mine think I might be interested???
Here's a short link to bubblenests:
The Bubblenest: A betta's masterpiece (broken link)