In Buenos Aires, there are bus lanes on some major avenues. That means buses are on bus lanes some of the time but not all of the time. A tram can't do that.
The problem is not whether cars can enter the exclusive lane. The bus need to be able to get out of the lane unless the lanes go everywhere the bus may want to go. Having tram lines go everywhere can be prohibitively expensive. Building exclusive lanes in major avenues used by lots of buses is cheaper and can improve travel times a lot.
Buenos Aires used to have a tram, actually. In the nineties you could still see the rails, on the road as you describe. But buses replaced them in forties because as the city grew the ability to change where public transport could go proved to be very valuable.
Tram lines are expensive, and require that the city (population, economic, and social centers) remain largely static. If you predict wrong, you can end up spending millions on a tram line that doesn't get used.