The world champions introduced Lars Stindl for Emre Can in the 83rd minute as they pushed for an equaliser.
Löw will hope to see better defending when his side face Spain and Brazil before they begin their World Cup defence in Russian Federation, but their battling spirit will give the coach plenty of encouragement.
Lacazette, replacing injured forward Olivier Giroud, forced a good save from Germany keeper Kevin Trapp with a powerful shot but went one better in the 34th minute, tapping in from close range after superb work from Anthony Martial.
Germany coach Joachim Loew was eager to test his squad and made six changes to the team that drew 0-0 against England at Wembley on Friday, including three in defence.
Minutes later Trapp had to be alert again to keep Mbappe out low to his right, the Paris-Saint Germain goalkeeper denying his club-mate after a neat Cruyff turn in the penalty area.
The Germans woke up after the break and substitute Antonio Rudiger should have levelled when he was set up by Julian Draxler in the box.
Germany did not have to wait long for their equaliser as Ozil led a swift counter-attack, his pinpoint throughball releasing Werner and the RB Leipzig forward calmly slotted under Mandanda.
A Kroos free-kick rattled Mandanda's bar with 20 minutes to play but while the Real Madrid midfielder was wondering how it stayed out, France scored.
But Stindl struck in stoppage time to rescue the hosts.