I forgot what I wanted to say as soon as I started talking
「そばから」は as soon as や right after とよく訳されます。
「話しているそばから内容を忘れちゃう」I forgot what I was going to say as soon as I started talking もしくは I forgot what I wanted to say as soon as I started talking.
「話しているうちにどんどん忘れていく」のニュアンスを表したいなら The more I spoke about the dream the more I forgot もしくは I started to forget more and more of the dream the more I spoke about it.
私のイメージは「そばから」= 動作の繰り返しを表すイメージです。つまり、よく起こることです。例えば、
うちの子は片付けているそばから部屋を散らかす。My kid always messes up the room as soon as/right after I tidy it up.