I’m having the exact same issue on a Fire 10 HD that’s just over a year old and a new 2019 Fire 7 I got on Prime Day this year. Both devices charge for a few moments then the charging icon disappears. I’ve tried it with different cables and plugs.
Its clearly software related as I've managed to get the Fire 7 to charge while turned off, however I can’t get the Fire 10 to stay turned off while charging so I cant check the workaround.
Just as an addendum. I can still use both tablets while they’re plugged in just fine, the Fire 10 just sits at 1% battery saying it’s not charging but I can use it as normal without it dying on me so it’s not the loose charging port that some people have with them.
If it is less than 2 months old, it should still be under warranty. The Fire 7 and HD 8 have a 90 day warranty, while the HD 10 has a 1 year warranty. I would advise contacting Amazon customer support:
Hold the tablet vertical and give it a solid thump on a hard surface. My battery was functioning normally until a few days ago so I know it was not a battery issue but it would not charge above 1%. Found a thread on ifixit saying to charge the device in the vertical position but that didn't work... So I gave it a rap since I had nothing to lose. 10 minutes later, I'm at 12% already. I'll update if it doesn't fully return to normal.
Highly unusual that they repair and send you back your original one, as mostly they send you a refurbished unit, meaning one that was returned, but checked to be in good working order, but that they can not sell for new.
I have never heard of anyone that sent in there tablet, and received back there same tablet, for a mechanical tear down (take apart) and repair.