The rule is absolutely simple:
Airbases are only allowed as airbases, not as a substitution of any other terrain improvement.
If you build an airbase somewhere to increase the range of your airforce, you do not need to build a railroad in the same square, of course.
But the use is restricted to strategic positions.
So NO building them on hills to increase food production, NO substitution for farmland and railroad, NO surrounding enemy cities or your own for protection against AI planes and missiles, NO lines of airbases instead of railroad, etc.
Just as airbases!