Has a city ever "un-annexed" part of itself

No, I am very right. Please reread what I wrote. I never said that NYC held “what would become Nassau County.” All I said was that NYC held (in 1898) what would become about 12 square miles of Nassau County (in 1899).

I think the source of your confusion is this: When 5-borough NYC was created in 1898 the BOROUGH of Queens was not the same – that is “coterminous” – as the COUNTY of Queens. This is important, and very surprising to modern NYers. In 1898 Queens Borough extended from the East River to about Floral Park; meanwhile Queens County extended from the East River to the Suffolk County line. So Queens County contained Queens Borough, plus a bunch of smaller municipalities running eastward! (This strange and unworkable arrangement inspired the creation of Nassau County in 1899, an act that made Queens Borough and Queens County coterminous, as it remains today.)

When I wrote my original post I was very careful not to confuse the borough with the county. It is accurate as written.

Reviewing, I see you did state that, and then I sort of restated it again in my response “(except for a few parcels traded back and forth when setting the boundaries in 1898)” - IIRC, included in that was what would become Bellrose Terrace - actually these border land swaps are probably covered in detail in Forgotten NY articles, but I am not sure which ones.

Looking back at all these responses, I am not sure we have ANY concrete examples whatsoever of a municipality willingly ceding back an area that was incorporated under itself.
We have plenty of examples of secession & secession attempts,
We have examples of the state/county/town going over the municipality’s head to merge/re-arrange/redraw boundaries (this would include connected landowners/developers wishing to gain control their own zoning/tax levies in an area)
We have examples of cities incorporating the entirety of their county, and ‘independant’ cities.
There must be an example of true de-annexing somewhere - I could conceive of a muncipality annexing an undeveloped area for development, then maybe after a while lopping off an section of that parcel which looks like it would never be developed, because while it is under city control the city must provide even the remotest farmhouse or cabin with water/sewage systems/street-lights/paved access/fire protection etc. I thought I read of this or heard of this somewhere - , there’s even forms for it on-line Reviewing some of these cases on-line, they seem to be petitions for secession by the residents in the affected area, but apparently the municpality does agree in some cases, so I guess that sort of meets the OP criteria.

On the national level, this happened with Malaysia and Singapore in 1965. Singapore had been an integral part of the Malaysian federation, but the Malaysian central government expelled Singapore from the federation-- Singapore did not want to secede; indeed its leaders tried hard to talk the Malaysian leaders from kicking Singapore out.