Since the second world war, the wisdom has been "if the tank fires nothing but machine guns - that means they haven't spotted you yet". After all - they're not going to waste very limited and expensive main gun rounds on what might possibly be nothing. Out of forty or fifty rounds, only a dozen are going to be screaming meanies flechette rounds - so make 'em count. Meanwhile, you're gonna have a few hundred to few thousand six millimeter and fifty-cal rounds.
Of course, without the supply-lines of pre-event times, that has changed. A few effective fused rounds are less resource intensive to a microfac than belts of MG bullets, and there is almost no point in carrying non-explosive sabot rounds due to the lack of other tanks and long-rod penetration are downright overkill on anything the aliens have.
So when you hear nothing but machineguns these days, you know the dung has hit the oscillating air distribution unit.
What do you do? There are a couple schools of thought. The obvious one is go in the opposite direction, and avoid whatever trouble is out there. Not a bad idea, but not always the best payoff, and nor always the safest - if it can overrun the tank, it might overrun you.
Doing the Prussian thing and advancing towards the sound of the guns has its benefits. You can see how bad the threat is, if you actually rescue them, you've made friends with people who own a tank. Well, at least people who own a machinegun - this advice applies if you're hearing fire coming from a settlement, outpost, or light vehicle too you know.
The somewhat less scrupulous might stick around and watch the destruction. If the tank crew can't deal with the problem, you're going to get a free tank out of the deal when they abandon it. They will abandon eventually - despite what you think, a tank can't run over an unlimited number of reanimates. Those big wide mobility enhancing tracks lower ground pressure, so even at seventy tons, it doesn't crush as well you might think, and crap stuck in the running gear is going to immobilize the thing eventually. After that, the reanimates aren't that stupid, they will wait around for a beta or type three to show up, and open the thing like a can of sardines. Popping the hatch and running for it is better than waiting to be crushed by a Lambda.
Give it a day or two for the reanimates to disperse, bring some fuel and repair supplies, and a new tank for you. Of course, they're fuel hogs and ammo hogs, and well, kind of a booby prize, which hopefully you'll realize before you end up in the position where you're firing nothing but machineguns...