Szoboszlai, a Liverpool midfielder, captained his country in Wednesday’s match in Stuttgart, which was won by goals in either half from Jamal Musiala and Ilkay Gundogan.
The 23-year-old came close to netting a quick equaliser after Musiala’s opening midway through the first quarter. Szoboszlai was initially denied by a stretched Manuel Neuer, who deflected his free-kick out from the top corner, then burst into the penalty area and saw his attempt blocked by Jonathan Tah.
But Gundogan’s 67th-minute strike sealed Germany’s victory and confirmed Hungary’s second defeat of the tournament, as they finish the group phase against Andy Robertson’s Scotland on Sunday.