TP4056 Ground isolation

Greetings, I'm building a solar project to monitor charge current and discharge current as well as lipo 'State Of Charge'.

The configuration is a 5V solar panel feeding a TP4056 which B+/- connect to a MAX471 bidirectional current monitor which connects to a LiPo in parallel with a MAX17043G lipo fuel gauge.

Unfortunately in this configuration with sensors on the B+/- outputs I cannot associate my TP OUT ground pin to those sensors without creating a ground loop that would prevent TP protection from working properly. I understand this is a non-typical configuration but this is the only way I could monitor charge & discharge current with one sensor and one analog pin.

Any input would be greatly appreciated.

Datasheets:
CHRG - https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Prototyping/TP4056.pdf
Current Sense - https://pdfserv.maximintegrated.com/en/ds/MAX471-MAX472.pdf
Fuel Gauge - https://datasheets.maximintegrated.com/en/ds/MAX17043-MAX17044.pdf

Ugly schematic attached