It looked promising, but I ended up deciding NOT to use the BAT pins of the Xiao. Thus I decided to connect the battery to an 3.3v LDO (an XC6227C331PR-G), and this to the Xiao’s 3V3 pin directly. Then the TP4056 will charge the battery from the VBUS as before.
These are the schematics. I still have not tried it, do you guys think it makes sense at least?
LDO:
Charger:
VBUS and 3V3 are the pins of the Xiao. BAT+ is the positive contact of the battery. The LDO should stop working when the Xiao is connected to the USBC, as this means the Xiao will already output 3V3.

