At the same time, the older generation, such as my parents, used "New York" (or "the city") to mean approximately "Manhattan", a holdover from what the city was before the consolidation with what are now the remaining boroughs. That always seemed old-fashioned to me. I believe you can still see some old subway signs that use "New York" to mean "Manhattan". (Incidentally New York is also the name of the county that is almost but not quite coterminous with the borough of Manhattan.)
When I was growing up, the state was more or less never referred to as simply "New York" by people in the New York the city. It was "New York State", most of which was "Upstate New York" (though that couldn't refer to Long Island, and it was never quite clear where 'Upstate' began).
The reverse shibboleth quality of "New York City"/"NYC" is probably dying out, may be already dead. Nonetheless I find it annoying.
Wikipedia even notes the differentiation is important.
"The city is referred to as New York City or the City of New York to distinguish it from the State of New York, of which it is a part"