What was posted above is not correct.
I work on this stuff for a living. Bad fretwork can and usually does cause sustain issues and most people don't know it.
Saying that "if the sustain is the same on the 23rd and 24th fret" it isn't due to bad fretwork is just absolutely wrong.
You're talking about 12th to end. Most guitars I see have some degree of rise from the 12th fret to the end instead of fall-away, which is a drop off, ideally gently curved. The last 2 frets might be fine but both are too high and everything after the 12th might be rubbish as well.
"You're talking about 12th to end."
no I am talking about 23nd and 24th fret. It is obvious that if sustain sucks on 24th, and also sucks the same way on 23th, whereas it sustain for ages in buzzy 17th, then obviously the problem is not the freaking fretwork. You don't have to be a nobel prize winner to understand this.
I have researched the topic of sustain in so much advanced ways (physics, vibrations), that I think that someone trying to explain sustain problems by blaming the fretwrok "silver-bullet"-style, and bringing the fretwork in any discussion about sustain, is just downright retarded.
If a guitar's woods want to kill sustain they will do it, no matter how perfect the fretwork is, or whether the "drop off" is there or not.
The reason I am writing this, is to prevent people from investing fortunes (upgrades, repairs, mods, etc..) on guitars that will never deliver.
You have told us more than once that you do this for a living, I am a scientist who does not live on doing simple fixes on ppl's guitars.
There is enough bad information on the internet without posts like that.
I dont know about the internet, but I know that places like this forum are dying out due to behaviors like yours : semi-knowledgable professionals using the forum to promote their own interests, muting ppl who do not contribute to their interests, or have a different view or are just plain smarter than them.