And yes, this is an ancient, ancient dream of mankind, one replete with cautionary tales about the Bad Things that will befall you if you attempt to actually solve it. (One such tale, The Substance, was nominated for a few oscars.) But so was human flight. We yearned for it, and our elders told us what fools we would be for even trying with things like the tale of Icarus... and then one day on a hill in Kitty Hawk, NC...
from what I’ve seen tales against a search for immortality are in regards to enjoy life while you have it, make relations, laugh, love, mourn, and remember, rather than have your entire life consumed in a desperate attempt to postpone the end, sucking all the joy out of it. we still have a long ways to go to avoiding death entirely, so I’d figure the best course of action is to enjoy life rather than to waste it in hopes of getting some extra time.
and yeah bringing up what you've brought up, I see your point. it does seem like the trope has been distilled down to "searching for eternal life is bad" instead of "don't waste everything in the hopes of eternal life".
There are, of course, also examples where the converse holds true. Finding a long term partner who you want to create a family with for example. But all in all the balance strongly favors that the error margin becomes smaller.