Too much voltage drop due to line loss and low supply voltage.
The supply voltage dips and that, coupled with the line loss triggers a transfer to the UPS.
With the load now being supplied by the UPS, the line current drops, the terminal voltage rises and the UPS transfers back to grid supply.
Rinse and repeat.
This may not be the problem but it is definitely the first thing to rule out.
--------------------
Ohm's law
Not just a good idea;
It's the LAW!