Having long range weapons for capital ships is part of the design that make them viable. Especially true for both modular large weapons, and builtins (TPC on Onslaught). Removing the range advantage breaks the design.
Also the weird behaviour you are seeing may be due to other weapon's damage type : I suspect AI wants the most effective weapons to deal with enemy's shield at good distance, so having some 800-900-1000 range kinetic guns would help. If the ships has only high explosive guns and no kinetic (or only short range kinetic), I suppose AI will prefer TPC as shield breaker, rightfully so.