Christoph Baumgartner and Brajan Gruda scored two goals apiece as RB Leipzig moved back into the top four at Hoffenheim's expense.