Not true so. The US thought that in Vietnam, the F-4 (?) didn't have an on-board canon for that very reason. All new planes again have one, because dog fights turned out to be very much a thing. The Phoenix missile, and the F-14, have been built around the beyond-visual range idea. Both are out of service now. Beyond visual range works when you see the enemy but the enemy doesn't see you. If both parties see each other, the first shot will be beyond visual range, any survivors will find themselves in dog fight after that. And if both side use stealthy fighters, they won't see each other, or be able to engage each other, at distances beyond a dog fight.