Welcome to the Apple Support Communities. From your post, I understand that the Lightning to 3.5 mm Headphone Jack adapter isn't functioning properly. Specifically, unless held in a particular way, the audio cuts out. I'm happy to help!
I see you've tested the adapter with two separate auxiliary cables and a pair of headphones, but the issue persists. Since those steps haven't solved the issue, I would recommend taking your iPhone and adapter into an Apple Store or Apple Authorized Service Provider to be inspected. A Genius or Apple-certified technician can determine what the issue is, and how to resolve it. Find locations, get contact information, and set reservations here: Apple - Find Locations.
You can also reach out to Apple Support directly for more information and to review your options: Contact Apple Support.
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
iPhone 8 Plus aux adapter not working?
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.