Afaik the two are OR'ed. The order of enabling and disabling doesn't affect it(they're two seperated chips or chipset driving it) after all.
Afaik the state of A20 on powerup of the machine is set to on(8042 on, port 92h off), but after that it's just what was last programmed.
UniPCemu simply does a simple thing: only when emulation is started(initialization of all hardware) it clears A20 bit on System Control Port A and clears(XT) or sets(AT and up) the A20 bit(bit 1) on the 8042(KBC as you call it, although KBC implies no mouse, which it can have on newer machines(on the second PS/2 port)) output port. In all other cases(CPU reset, reboot etc.) it's just left to whatever the value was.
I've checked this with Barotto in the past: https://github.com/barotto/test386.asm/issues … mment-470646476 . It's that post and the 3 posts after it where we verify it's behaviour.
Simply said: it's motherboard-specific. It's probably left alone when resetting/triple faulting, but apparently(if http://www.rcollins.org/Productivity/A20Reset.html is to be believed for the untested motherboards) they're left alone for all motherboards(and we've already found out that isn't the case or some weird behaviour in the memory bus for one device: the generic 486dx-50 machine. And the PS/1 2133 (486dx) seems to set it. But the PS/1 2011 (286) and PS/1 2121 (386sx) honor it's set value.