I made a thread about this just last week (didn't know that this one already existed) having just bought Airpods and experiencing the same thing (more the occasional minor hiccup than a full lost connection) with my 8 Plus.
I can walk around my house while leaving my phone wherever with no problem, but very occasionally, just as I put my phone in my jean pockets, there would be a little hiccup, so to speak. I unpaired and re-paired them the day after I first noticed it and over the last week it's only happened once. Shouldn't happen at all given the price of these things, but probably not worth exchanging over.