Yeah, that sounds about right - A lot depends on what level you’re at and how “agile” the company you work for is. It’s not wasted per se - Most of the time other engineers build on your work, usually as bugs are found or the feature evolves. But yeah, products (and companies) also will die off.
Code merely solves a given problem at a given time. It’s not meant to last forever. Rejoice in the knowledge and mastery you have gained instead.