Lithium-ion batteries can be touchy things.
I have been told, that individual cells of a battery can fail. The electronics in the battery pack are constantly working to spread the load over the different cells.
If you measure the voltage of a single cell, (as the packs electronics are doing continuously) a certain voltage indicates the cell is fully charged. when you start to draw power to voltage will go down a small amount, and then plateau. If a cell has failed, when the amperage on the failed cell rises to a nominal operating level, the voltage will drop to near zero. The electronics in the pack will realize that the pack cannot maintain nominal voltage, and will cut all power off from the load (computer.)
This has happened to me personally, I had a MacBook Pro that would shut down cold at around 60% reported battery life. It was out of warranty and I had to buy a new battery pack.
My mom has experienced the sudden power failure on her iPhone 6s, which I suspect is the exact same thing. The reported percentage of battery remaining was not nearly as uniform, but I suspect that is because the degree of variation in current draw is much greater (as a percentage of maximum draw) and frequently it would happen at anywhere from 60% to 20%, but would frequently be triggered by doing certain tasks, like taking a picture.
There is always potential that you will receive a replacement part that was marginal, and will fail soon after being installed. That is the first line I would pursue. It is unlikely, but not impossible that the fault lies with the tablet itself, since changing the battery seems to have changed the symptoms.