Both describe something undesirable continues all the way, but `Vする一方だ` implies **escalation**, and `Vするばかりだ` does not. In this sense, you can replace `Vする一方だ` with `(ますます/どんどん)Vするばかりだ`.

If the verb already has a cumulative meaning, then the two expressions make no difference.

> 死傷者は増える一方だ。 = 死傷者は増えるばかりだ。  
> _Casualties keep on increasing._

Otherwise, these two would not be interchangeable.

> 子どもはおびえる一方だ。 _The child only gets more and more frightened._

> 子どもはおびえるばかりだ。 _The child can do nothing but being frightened._