One Piece started in 1997 in the pages of Weekly Shonen Jump and immediately elevated itself into a manga and anime behemoth, even topping Dragon Ball in sales and popularity in Japan. The series was widely considered one of the so-called "big three" of Shonen Jump in the 2000s alongside Naruto and Bleach. While the latter two manga and anime have concluded (though Naruto has a sequel series Boruto), One Piece continues to chug along as the undisputed King of Shonen.
Shonen Jump is designed to create popular series that can go on for as long as possible. If it isn't popular, it gets cancelled. If it's popular, it goes on until it can no longer continue. Too often, this leads to popular series dragging out beyond the point they probably should have, as the likes of Death Note and Bleach can attest to.
Eiichiro Oda designed One Piece so it could last a long time without losing steam. He isn't dragging out the story and withholding the ending; on the contrary, he has an ending already planned out and will write it when the time approaches. This sets One Piece apart from its fallen peers.
Oda pre-planned his ending, set a clear goal for his protagonists and built in smaller sub-goals for his arcs. We know Luffy wants to be Pirate King, but we don't know exactly what the mystical treasure of One Piece is. On his journey to that goal, Luffy and his crew face many other challenges. Naruto did a similar thing with its protagonist's goal of becoming Hokage, while Bleach lacked ongoing goals entirely and fell into a pattern of repetitive fights. One Piece keeps itself fresh with arcs vastly different from each other.
Naruto at first had similar narrative strengths to One Piece. However, after the Pain arc resolved Naruto's character arc, Masashi Kishimoto fell into the pitfall of fluffing up the series, introducing the vastly unneeded Fourth Shinobi World War arc, and falling prey to power creep with the introductions of Madara and Kaguya. Oda, on the other hand, has made it clear that he does not intend to pad out One Piece beyond its natural conclusion.
One Piece has such a huge world, consisting of such vast sociological and political structures, that it would be impossible to end the journey any earlier than Oda intends to. Instead of artificially trying to lengthen the series, the world of One Piece forces Oda to go on longer. An entire arc can simply be made just to explain the devil fruits, or the secret of the 'D.' initial that many One Piece characters bear. Characters such as Buggy that appear in the first few chapters can return a hundred chapters later as more significant characters.
Many other shonen fail to do proper worldbuilding, or flesh out the characters beyond the main ones. Many of the characters from early on in Dragon Ball became inconsequential or phased out due to how strong the main characters have become, one notable example being Yamcha. Naruto's worldbuilding was built more on plot convenience than anything else. The story and world of One Piece begs to be as long as it is, and not any longer than it needs to be. Only Oda knows when One Piece will finally end, but rest assured, when it eventually does, it'll end because it's ready to end, and not because of any drop in quality.