drinkingbird
Part of the Furniture
So, the problem was in the power adapter. I had an old AC-1200 lying around. I connected the router with it’s adapter and router is now switching on UPS without any problem.
I'm assuming you're using a simulated sine wave UPS? Those will degrade power supplies if you have a lot of "on battery" events. Some power supplies (such as the high efficiency ones in many modern PCs) won't even run off those UPSes. Probably cheaper to just get a new adapter every couple of years than replace the UPS, however it could also be damaging the router itself over time.