Was there ever (since 1850, or even better since 1940) a case where:
Country A was attacked by country B
Country A won the armed conflict after being attacked
Country A - as part of post-war negotiations - obtained control over territory formerly governed by country B (examples of this are Sudetenland or Kaliningrad after WWII).
Country B formally signed off on not having a claim to this territory.
Country A faced international pressure - ideally successful - to withdraw control from said territory, by declaring it to be illegaly occupied. Pressure here being defined as UN resolutions (SC or GA) etc...
Please note that this is very specifically about external pressure. E.g. not a case where the country chose to unilaterally withdraw control for its own internal reasons and/or under pressure from occupied population, ala British Empire's many territories.