The opposite is true; removable batteries almost entirely end up in landfills.
Putting batteries non-removably inside devices makes them much more likely to be recycled, along with the rest of the recyclable components of the device.
Right now, that may be the case, but that's because those batteries generally have zero scrap value, so you're just hoping users will care enough about the environment to not do this, and take them to a proper recycling bin (like at the entrance to Target).
But the parent was predicting that batteries would become significantly more expensive as these materials became more scarce. In that future, a dead phone battery would still have some value, so people would generally want to take them someplace where they can get money back for them.
The other factor is that, in this possible future of expensive batteries, it'd be much more important for them to be standardized and more easily replaced. If your phone costs $500 sans battery, but the battery for it is another $500, you're going to want a standardized design that you can swap between different phones or other devices.
That's because they have near-zero value, the component elements still being much cheaper to produce from ore than from recycling. That flips around once we start running out of ore.
Basically, economics takes care of this for us. At the end of the day, battery reagents are unconsumed resources, so we'll be fine (at some price equilibrium probably higher than their price today) so long as the number of people and their need for power storage remains bounded.
There's a $12 deposit (core charge) you pay if you don't exchange one, which drives recycling, plus stores and landfills tend to accept them for free.
Just look at the recycling rates today for car batteries (lead acid): it's nearly at 100%, though of course part of that is because almost no one changes their own battery, and when they do, they do it at AutoZone in the parking lot and leave the old one there. But it's perfectly possible, especially with them retaining value, to have extremely high recycling rates for Li-ion batteries, so that the lithium, cobalt, and nickel inside never goes to waste and is continually recycled.
What we really need is better standardization for batteries for small devices, particularly phones, and elimination of the ability of devices to have non-replaceable batteries. I would actually favor a legislative approach to this: ban the selling of devices with sealed-in batteries altogether in major markets, forcing manufacturers like Apple to come up with standards and making batteries at least somewhat easily removed to facilitate recycling.