If you had an indestructable soldier, you could paint them bright pink and have them live stream their position, it wouldn't matter they're indestructable.
Now camo is still effectiveness, say against poor soldiers or one's who had their division leader sell that equipment off to make a little extra income. But you better understand your enemy well, or just putting up camo and then huddling together in a group with no further security will get you killed all at once.
Also - acquiring / maintaining / training / using good IR equipment consumes far more resources & attention than basic camouflage does. Good troops do something called "field training", where they become quite familiar with how effective cover & camouflage can be. And they've figured out that the stakes on a battlefield are "death", not "deal with server being hacked".