Apologies if this is a wrong pre-conception - but I have heard of this... is it true? If so, why did Japan drop a “more advanced” weaponry such as the gun in favor of older ones like swords and katanas?
It indeed is a misconception. See here.