A giant robot uses a lot of energy, is a huge target to hit, has no stealth, cannot camouflage or take cover, has a very high maintenance cost compared to anything else, covers less area by itself than multiple smaller ones, is a real problem to transport anywhere, cannot be used effectively in urban or forest settings, and sinks in wet terrain.
A better option is to go small and efficient. Armoured exoskeletons for infantry and the like, RC helicopters armed with machine guns and rockets, small armoured vehicles with guided missiles and anti-missile defenses, stealth jets with very powerful yet fairly small bombs... There is no tactical need for giant robots. While powerful, they have few uses, and are made redundant by other components of the military.