Question: When was the peace treaty signed based on which Teutonic Knights suffered only minimal territorial losses?

Context articles: U.S.–German Peace Treaty (1921)
Battle of Grunwald
Treaty of Melno
Treaty of Kalisz (1343)
Treaty of Christburg
Peace of Thorn (1411)
Treaty of Salynas
Polish–Lithuanian–Teutonic War
Treaty of Königsberg (1384)
Peace of Brześć Kujawski

The U.S.—German Peace Treaty is a peace treaty between the U.S. and German governments, signed in Berlin on August 25, 1921, in the aftermath of World War I.
 The main reason for the conclusion of that treaty was the fact that the U.S. Senate did not consent to ratification of the multilateral peace treaty signed in Versailles, thus leading to a separate peace treaty.
 Ratifications were exchanged in Berlin on November 11, 1921, and the treaty became effective on the same day.
 The treaty was registered in "League of Nations Treaty Series" on August 12, 1922.
The Battle of Grunwald, First Battle of Tannenberg or Battle of Žalgiris, was fought on 15 July 1410 during the Polish–Lithuanian–Teutonic War.
 The alliance of the Kingdom of Poland and the Grand Duchy of Lithuania, led respectively by King Władysław II Jagiełło (Jogaila) and Grand Duke Vytautas, decisively defeated the German–Prussian Teutonic Knights, led by Grand Master Ulrich von Jungingen.
 Most of the Teutonic Knights' leadership were killed or taken prisoner.
 Although defeated, the Teutonic Knights withstood the siege of their fortress in Marienburg (Malbork) and suffered minimal territorial losses at the Peace of Thorn (1411) (Toruń), with other territorial disputes continuing until the Peace of Melno in 1422.
 The knights, however, would never recover their former power, and the financial burden of war reparations caused internal conflicts and an economic downturn in the lands under their control.
 The battle shifted the balance of power in Central and Eastern Europe and marked the rise of the Polish–Lithuanian union as the dominant political and military force in the region.
The Treaty of Melno (Lithuanian: "Melno taika" ; Polish: "Pokój melneński" ) or Treaty of Lake Melno (German: "Friede von Melnosee" ) was a peace treaty ending the Gollub War.
 It was signed on 27 September 1422, between the Teutonic Knights and an alliance of the Kingdom of Poland and the Grand Duchy of Lithuania at Lake Melno (German: "Melnosee", "Meldensee"; Polish: "Jezioro Mełno"), east of Graudenz (Grudziądz).
 The treaty resolved territorial disputes between the Knights and Lithuania regarding Samogitia, which had dragged on since 1382, and determined the Prussian–Lithuanian border, which afterwards remained unchanged for about 500 years.
 A portion of the original border partially survives as the border between the Republic of Lithuania and Kaliningrad Oblast, Russia, making it one of the most stable borders in Europe.
The Treaty of Kalisz (Polish: "Pokój kaliski" , German: "Vertrag von Kalisch" ) was a peace treaty signed by King Casimir III the Great of Poland and the Teutonic Knights on 2 June 1343 in Kalisz.
The Treaty of Christburg (modern Dzierzgoń in Poland) was a peace treaty signed on 2 February 1249 between the pagan Prussian clans, represented by a papal legate, and the Teutonic Knights.
 It is often cited as the end of the First Prussian Uprising, but it was not adhered to or enforced, especially after the Battle of Krücken in November 1249, where Prussians massacred and tortured to death 54 knights who had surrendered.
 The treaty guaranteed personal rights to all Prussians who converted to Christianity, but it did nothing to establish peace as many Prussians did not wish to convert and the Knights swore to root out paganism.
 It is one of the few documents from the period that survive in full to this day.
 It provides a useful insight into the life and religious tensions in pagan Prussia.
 It also offers a small glimpse into the Prussian mythology and traditions.
The (First) Peace of Thorn was a peace treaty formally ending the Polish–Lithuanian–Teutonic War between allied Kingdom of Poland and Grand Duchy of Lithuania on one side, and the Teutonic Knights on the other.
 It was signed on 1 February 1411 in Thorn (Toruń), one of the southernmost cities of the Monastic State of the Teutonic Knights.
 In historiography, the treaty is often portrayed as a diplomatic failure of Poland–Lithuania as they failed to capitalize on the decisive defeat of the Knights in the Battle of Grunwald in June 1410.
 The Knights returned Dobrzyń Land which they captured from Poland during the war and made only temporary territorial concessions in Samogitia, which returned to Lithuania only for the lifetimes of Polish King Władysław Jagiełło and Lithuanian Grand Duke Vytautas.
 The Peace of Thorn was not stable.
 It took two other brief wars, the Hunger War in 1414 and Gollub War in 1422, to sign the Treaty of Melno that solved the territorial disputes.
 However, large war reparations were a significant financial burden on the Knights, causing internal unrest and economic decline.
 The Teutonic Knights never recovered their former might.
Treaty of Salynas (German: "Frieden von Sallinwerder" , Lithuanian: "Salyno sutartis" ) was a peace treaty signed on 12 October 1398 by the Grand Duke of Lithuania Vytautas the Great and the Grand Master of the Teutonic Knights Konrad von Jungingen.
 It was signed on an islet of the Neman River, probably between Kulautuva and the mouth of the Nevėžis River.
 It was the third time, after the Treaty of Königsberg (1384) and Treaty of Lyck (1390), that Vytautas promised Samogitia to the Knights.
 The territory was important to the Knights as it physically separated the Teutonic Knights in Prussia from its branch in Livonia.
 It was the first time that the Knights and Vytautas attempted to enforce the cession of Samogitia.
 However, it did not solve the territorial disputes over Samogitia and they dragged on until the Treaty of Melno in 1422.
The Polish–Lithuanian–Teutonic War or Great War occurred between 1409 and 1411, pitting the allied Kingdom of Poland and Grand Duchy of Lithuania against the Teutonic Knights.
 Inspired by the local Samogitian uprising, the war began by Teutonic invasion of Poland in August 1409.
 As neither side was ready for a full-scale war, Wenceslaus IV of Bohemia brokered a nine-month truce.
 After the truce expired in June 1410, the military-religious monks were decisively defeated in the Battle of Grunwald (Tannenberg), one of the largest battles in medieval Europe.
 Most of the Teutonic leadership was killed or taken prisoner.
 While defeated, the Teutonic Knights withstood the siege on their capital in Marienburg (Malbork) and suffered only minimal territorial losses in the Peace of Thorn (1411).
 Territorial disputes lasted until the Peace of Melno of 1422.
 However, the Knights never recovered their former power and the financial burden of war reparations caused internal conflicts and economic decline in their lands.
 The war shifted the balance of power in Eastern Europe and marked the rise of the Polish–Lithuanian union as the dominant power in the region.
The Treaty of Königsberg was signed in Königsberg (Królewiec) on 30 January 1384, during the Lithuanian Civil War (1381–1384) between Vytautas the Great and representatives of the Teutonic Knights.
 Vytautas waged a civil against his cousin Jogaila, Grand Duke of Lithuania and future King of Poland, and allied himself with the Teutonic Knights.
 In order to secure Teutonic support in the civil war, Vytautas signed the treaty and granted Samogitia up to the Nevėžis River and Kaunas to the Knights.
 In 1382 Jogaila promised the Knights Samogitia only up to the Dubysa River, but never ratified the Treaty of Dubysa.
 Samogitia was important for the Knights as this territory physically separated them from uniting with the Livonian order in the north.
 Vytautas also promised to become Order's vassal.
 In February several Samogitian regions acknowledged their support to Vytautas and the Knights.
Peace of Brześć Kujawski was a peace treaty signed on December 31, 1435 in Brześć Kujawski that ended the Polish–Teutonic War (1431–1435).
 The treaty was signed in the aftermath of the Livonian Order's defeat at the hands of the allied Polish-Lithuanian force in the Battle of Pabaiskas (Wiłkomierz).
 The Teutonic Knights agreed to cease their support to Švitrigaila (who tried to break the Polish-Lithuanian union) and in the future to support only Grand Dukes properly elected jointly by Poland and Lithuania.
 The treaty did not change borders determined by the Treaty of Melno in 1422.
 The Peace of Brześć Kujawski showed that Teutonic Knights lost their universal missionary status.
 Teutonic and Livonian Order no longer interfered with Polish–Lithuanian affairs; instead Poland and Lithuania involved themselves in the Thirteen Years' War, the civil war in Prussia that tore it in half.