You said that the latency is at the 20msec and remains there when you running g-code, that is a problem, it should not be like that.
If the latency goes above 20msec is already a problem and if it remains there indicates that there is some real problem,
because the latency test does not measure above 20msec, so if the value is at 20msec (the very top) means that the response time can be 20msec or anything more.
You've mentioned this in your post:
CNC and desktop both running from the same UPS.
UC400ETH is powered at 24v.
Grounds tied together on the two power supplies.
And I'm wondering what these statements exactly means?
What do you mean by "grounds"?
The Protection earth (PE) or is the PC running off a DC power supply and so the 2 DC bus grounds are commoned?
Ethernet is isolated and if the second case then you break the isolation barrier doing so which could cause a ground loop and could lead to noise problems which could actually cause lost ethernet packets and could possibly rise the latency.
A latency issue like that could be caused by a power supply issue or a network card problem or by serious noise in the ethernet communication.
Or it could be caused by a too weak PC, but since you said it has an I7 core CPU I think it is probably not the reason, but you could check the CPU usage of the UCCNC.exe process in the Windows Task Manager when you run the g-code, so we could cross this possibility out quickly.