Disconnecting system load during charging
A number of PMICs, for example BQ25150 (just to pick one arbitrarily) will do this for you.  In fact, a battery charging IC that separates the load like this is preferred, since it can accurately determine the charging current and cut off charging at an appropriate level.  A system that charges the battery while running off the battery risks overcharging when the current drawn by the load exceeds the end-of-charge current.  Then you're dependent on the backup timer to reduce battery damage due to overcharging.