I'm pretty sure that the guys who fought WWII were interested in surviving thier sorties which means they attacked tanks from an angle steep enough that the main gun could not have been brought to bear.
I would also guess that tankers didn't go popping off their not-unlimited ammo supply randomly at every low flying aircraft they saw.
It would give their position away.
It would waste a round
There's no telling where the round would hit when it came down.
It has been doctrine, however, in some armies to have infantry lie down on their backs and fire their light weapons straight up at the
sound of an aircraft passing over head hoping for that golden BB.
I'm sure if ammo was free and unlimited, tanks would fire their main gun at... everything.
But, it's not.
wrongway