That's actually not possible due to the behaviour of API Routes in Next.js.
Next.js has API Routes and those are AWS Lambda functions. It's not a fully fledged backend and that's the reason we have to connect to Mongo everytime.
Watch this video, it explains how backend works in Next.js
youtu.be/Rrz2q5uCHdE