I have used the TP5400 in two applications like yours and I confirm that your interpretation of the datasheet is correct: It's both a 1S charger and also boost converter. Also your schematic is largely OK, BUT: You're missing a power path.
The TP5400 has two operation modes, it's either a charger OR a DC/DC converter, not both at the same time. As soon as you connect a 5V supply, the TP5400 goes into charger mode. In this mode, Vout will not reach 5V. As soon as you disconnect the 5V supply, the DC/DC converter acts as a boost converter and Vout will stabilize close to 5V.
So, you need to provide a power path from the 5V supply to the output, like D1 in the attached schematic. There's likely a more sophisticated way with a Mosfet that doesn't have the voltage drop. Also, note that R1 is important: D1 will have a leakage current and will slowly charge C1 when the 5V supply is disconnected. This would periodically start the charger and you'd see a drop in output voltage whenever that happens.