Will they ever lose to another dedicated handheld? IMO no. Never.
The PSP was the only ever legitimate rival it had but even that wasn't competing for the same audience outside of Japan. It was targeting an older audience that were looking for more mature experiences
That target audience moved onto mobile and console only gaming pretty quickly. The Nintendo target audience was next.
So Sonys handheld market is extinct and Nintendos is heading there at a slower pace. So nobody will ever outsell Nintendo with a dedicated device.
However they've already lost to another handheld device. And as we know that's android and iOS. Nintendo needed to invent the iPhone instead of apple to stay relevant here as a dedicated device maker but they didn't.