Which brand/model of UPS do you have?
A beeping can mean one of several things, such as battery failure, overload, low/excessive voltage, internal fault, power fluctuations, etc. If this only happens while playing games, it’s quite possible that the UPS is overloaded, since the graphics card draws a lot of power. If you recently made an upgrade to your PC, such as adding a second or more powerful graphics card, this may also indicate an overload.
Check which LED lights up while it is beeping and look at the icon next to it. If you still have the user manual for it, it will have a diagram explaining the LEDs.
If your UPS is an APC brand, this page explains what the icons for its LEDs mean.