The iPad hardware will always send audio to the device where the microphone is located. As such, when using the 3.5mm audio jack, the hardware will assume that you are using earbuds (that include a microphone) for listening to audio.
If you a just connecting a microphone, the iPad speaker(s) will be muted. If you need to simultaneously use both headphones and a separate microphone, you’ll need to find a suitable “splitter” adapter. These aren’t sold by Apple, but they are relatively easy to find at a popular online retailer. Whilst not making any recommendations, here is one example:
https://www.amazon.co.uk/Splitter-POSUGEAR-Headphone-Microphone-Compatible-Black/dp/B079PJL14Y/ref=sr_1_3?dchild=1&keywords=Mic+Splitter&qid=1599129224&sr=8-3
One very good reason for this arrangement is to prevent feedback “howl” - that would otherwise occur.
I hope this explanation proves to be helpful to you - if only in understanding why this behaviour occurs - and in identifying a potential solution for your needs.