I was actively in combat, and had been for a minute or two, when the on-screen messages started appearing saying that if I didn’t return to the fight I’d be teleported out. I’d been running AR/Blood, so I was both doing damage and healing myself and others. I even tried running through an AoE to see if taking damage would make it register that I was in combat when the messages continued to pop up, but it didn’t help. Prior to that, I had been in my menu up on the branch adjusting my abilities and passives until the encounter started, but I jumped down and entered combat within about 10 seconds of the Gatekeeper boss spawning.
I got sent back to Agartha with the deserter buff on a five minute timer, but when it hit 00:01 it just sat there and didn’t go away or tick to 00:00, so I tried to reenter Gatekeeper. It worked, but when I loaded into Deep Agartha I once again had the Deserter debuff for a couple minutes (I think it was somewhere around 2:37, but I could be misremembering). I was able to finish that fight and ultimately get my loot, so I didn’t miss the summon, but it was really frustrating and I was lucky I’d been right there when the portal opened in the first place or the debuff would have taken longer than the portal was open to go away.