A good test is do you have a mailing address in USA? A physical address not a mailbox
If I was living abroad temporarily but I knew I was coming back I would still retain a home address. Place is empty or sublet
Edit: the example you give about splitting time between places is something the IRS asks. Do you have residency in multiple states and countries?