Went back to the Balkans earlier this year and the train routes have got even more erratic and patchy than they were 10 years ago between neighbouring countries (when we could at least get from Belgrade to Sarajevo by train). Did similar thing to you with a minibus/taxi between the two, nowhere near as good.
The trains were still going from Belgrade to Bar and that route through the mountains looked stunning, wish we’d had the time. Also had brand new trains on the Sarajevo to Mostar route which was a surprise, kinda liked the charm of the big, slow, old carriages they used to have.