Erling Haaland scored a penalty in his final Borussia Dortmund appearance before departing for Manchester City.