Michael Olise scored with the last kick of the game to equalise for Bayern Munich, denying Heidenheim a crucial win in their fight against relegation.