Four days before their Champions League quarter-final, first leg at Villarreal, Bayern put in a strong performance on the road.
However, there could be consequences for Bayern who briefly had 12 players on the pitch after a mistake following a late double substitution.
"We drew the referee's attention to the fact that Bayern had eleven outfield players on the pitch," Freiburg director Jochen Saier told 'Sky'.
"That was bizarre, I haven't seen that before."
Freiburg need to lodge a formal complaint for there to be repercussions for Bayern.
Referee Christian Dingert noted the incident - which he described as a "totally confused situation" - in his match report and the official told Sky: "Now the DFB (German Football Association) must decide."
Under league rules, such a breach of the substitutes regulations could see the result being reversed.
When Niklas Suele and Marcel Sabitzer, who later scored, both came on in the 86th minute, only one player came off, leaving Bayern with 12 men on the pitch for 17 seconds.
"There was the bizarre situation," admitted Bayern coach Julian Nagelsmann.
"The fourth official showed the wrong number and Kingsley Coman didn't know he had to go off. Mistakes happen.
"From the point of fair sport there was nothing that speaks against it having been a fair game."
There were then eight minutes of stoppage time after intense discussions between both benches and the referee.
Germany star Goretzka, who missed Bayern's previous 13 league games with a hip injury, gave his team a second-half lead by heading in a free-kick.
Freiburg equalised when ex-Bayern striker Nils Petersen, who signed a contract extension Friday, hit the net just 17 seconds after coming on.
However Bayern pulled clear when Serge Gnabry, Kingsley Coman and Sabitzer fired in late goals.
Bayern are on course to win a 10th straight league title with a nine-point lead after second-placed Borussia Dortmund were later thumped 4-1 at home by RB Leipzig.
Even with their star striker Erling Haaland in the starting line up, Dortmund had no answers and were whistled by their own fans at Signal Iduna Park.
Since Domenico Tedesco replaced Jesse Marsch as head coach in December, Leipzig have lost just twice in 18 matches in all competitions.
They are fourth in the table and on course for a Champions League place next season.
Eintracht Frankfurt were poor ahead of Thursday's Europa League quarter-final home leg against Barcelona in their goalless draw with bottom side Greuther Fuerth.
Head coach Felix Magath made a losing start on the Hertha Berlin bench as they slipped back into the relegation places after a 2-1 defeat at third-placed Bayer Leverkusen.
Magath was sidelined by Covid when Hertha ended a 10-match winless streak by beating Hoffenheim a fortnight ago, but the visitors lost with the former Bayern coach on the bench.
Lucas Alario put Leverkusen ahead when he fired home from a corner, then Karim Bellarabi added a second before Vladimir Darida pulled one back for Hertha just before the break.
Japan forward Takuma Asano scored both goals as Bochum dampened Hoffenheim's hopes of qualifying for the Champions League with a 2-1 away win.
Both Asano's goals came from passes by Bochum goalkeeper Manuel Riemann.
Germany head coach Hansi Flick was watching in the stands, the day after his team were drawn to face Japan in the World Cup.