Basically it’s the same as the XIAO charging design. VBus turns off the VBat.
Edit> Since the BQ25180 has an integrated mosfet to isolate the battery from the SYS voltage, your approach should work fine, ie SYS voltage into the VBat on the XIAO base via a reverse biased diode (to prevent the XIAO’s charger from disrupting your charger - although I’d do some tests on whether that is an issue or not).

