In 2013 I was showing my new partner Bavaria.
We went from Oberammergau to Garmisch-Partenkirchen to Bad Tölz by bus (3) along Walchensee through Kochel, then by train (2) to Bayerischzell for the night. The next morning we went by bus (1) via Tatzelwurm to Oberaudorf, then by trains (2) via Rosenheim to Burnau am Chiemsee, buses (3) via Reit im Winkel to Bad Reichenhall, then train to Berchtesgaden.
Two days, seven buses, five trains, but we avoided Munich. Spent a lot of time on the Alpenstrasse.
Other than one of the Austrian routes through Innsbruck, or through Munich, or going around Munich to the north, it's not feasible to go from Berchtesgaden to Mittenwald entirely by rail. Rail lines in southern Bavaria radiate out from Munich with few cross links. For instance, there is no rail link between the branch going to Garmisch-Partenkirchen and the branch including Bad Tölz/Holzkirchen. But the bus from Garmisch-Partenkirchen to Bad Tölz is a very scenic route along the shores of Walchensee and down the switchbacks to Kochelsee.