Recent results on rare $B$ decays with BaBar