Germany's head coach has signed a contract that commits him to the role until the end of UEFA Euro 2028.