Unfortunately, this seems to be a problem inherent to USB-C PD when two devices are connected together who are Dual-Role Power devices and who have the same source/sink preference. The USB spec says it shall be decided randomly which device provides charge. Certainly way less intelligent handling than expected. Feature Request Megathread - Expansion Card - #173 by MJ1
So you just have to check which way power is going, and if it’s not the direction you want, try again.
This is something that needs to start being solved within powerbanks.