God is on His own side. Whatever side wins is the side God chose to win. That does not mean the winning side has His approval, it might, but not absolutely. The side that wins is fulfilling His purposes in the earth.
For example for a time, the beast wages war on the saints and is beating them not due to random chance, but this was granted to the beast by God.
Revelation 13:6-8 New King James Version (NKJV)
6 Then he opened his mouth in blasphemy against God, to blaspheme His name, His tabernacle, and those who dwell in heaven.
7 It was granted to him to make war with the saints and to overcome them. And authority was given him over every tribe, tongue, and nation.
8 All who dwell on the earth will worship him, whose names have not been written in the Book of Life of the Lamb slain from the foundation of the world.
Daniel 7
19 “Then I wished to know the truth about the fourth beast, which was different from all the others, exceedingly dreadful, with its teeth of iron and its nails of bronze, which devoured, broke in pieces, and trampled the residue with its feet; 20 and the ten horns that were on its head, and the other horn which came up, before which three fell, namely, that horn which had eyes and a mouth which spoke pompous words, whose appearance was greater than his fellows.
21 “I was watching; and the same horn was making war against the saints, and prevailing against them,
22 until the Ancient of Days came, and a judgment was made in favor of the saints of the Most High, and the time came for the saints to possess the kingdom.