The whole bow-to-firearm transition around the world is kinda complex, with a lot of different reasons that varied based on geography, but one thing seems pretty clear: in actual combat, armies with bows
did not do well against armies with firearms.
Although the English had laws on the books well into the sixteenth century that helped stimulate longbow training and made longbows relatively cheap, the longbowmen that Henry VIII brought with him on his later continental campaigns were absolutely terrified of fighting armies with firearms. One reason was simply the noise; firearms are loud and scary, and morale is a much bigger factor in war than it often gets credit for. Another was range and muzzle velocity, both of which were significantly lower for the longbow than for the arquebus. Sustained rate of fire was another one (as compared to rate of fire over short intervals). Longbowmen didn't stand much of a chance in a fight against continental mercenaries, and they figured that out pretty quickly. French and English primary sources from the 1540s fighting almost universally agree that English/Welsh longbows were simply not a useful factor in war compared to French firearms.
The reality of sixteenth-century combined-arms warfare meant that sometimes there were situations in which armies that
contained longbowmen could still do well - for a time. At the Battle of the Spurs in 1513, longbow fire contributed to confusing the French cavalry, which fell into disorder and then was smashed by an English attack from multiple directions. But technology and the times changed, and French armies began to field more arquebus-armed soldiers. By the 1540s, firearms were so common in the French ranks that the situation described in the previous paragraph became a far more regular occurrence.
English writers tried to keep support up for the longbow as a traditional national weapon, but they had a lot of trouble answering more numerous rival pamphleteers who pointed out the longbow's many technical flaws. Men who had trained as longbowmen for years pointed out that in far less time they could train to hit targets
better with an arquebus than they could with a bow. This was not a problem with inadequate numbers of trained longbowmen (a condition rarely adduced in the pamphlets of the time, and often argued against in same). Nor was it a problem of price. Longbows just...kinda...sucked by comparison to gunpowder weapons. Now, the firearms of the sixteenth century were certainly not what we would call accurate, either - but in most useful respects they were technically superior to the longbow, and the tactical results bore that out.
In typical English fashion, the government did not abandon the longbow until 1595, a half-century after it had been fairly conclusively shown to be of limited value in combat. That's the sort of dedication to competence that you'll find in Her Majesty's Government, from Elizabeth I to Elizabeth II.
Attention maybe, but not necessarily fire. Crossbows were only accurate up to about 200 yards, with a max range for the best crossbows still not even reaching 500 yards. Put a king at the back of 10,000 men, or even a general sitting behind 2,000, and you'll be lucky if your bolt can get far enough to even vaguely threaten them let alone accurately hit them. Add in a personal guard and the odds of a crossbowman hitting enemy leaders is nearly non-existent no matter how decorative their armor is.
In addition to that, even if theoretical accuracy for crossbows and longbows was high, actual marksmanship under combat conditions against maneuvering troops was...not fantastic. Casualties due to missiles were often not super high; even the vaunted longbow forces in the Plantagenet army at Agincourt didn't inflict most of the enemy's losses (that came down to the melee in the mud). Obviously, the longbow wasn't
useless or anything. It could do work if it hit, missile fire usually has a negative impact on enemy morale, and avoiding missile fire would exhaust an enemy more quickly than otherwise. But in no way did a visible enemy leader immediately sign a death warrant by entering combat against missile-armed troops.
There were undoubtedly risks to visibility; a very visible leader
would draw attention and sometimes fire. The litany of warrior-rulers killed by being warriors is a pretty long one. But there were also benefits. Performance of the role of Being a Martial Leader was important. It buttressed royal and aristocratic legitimacy. It was usually a boon to troop morale to have a visible leader in combat with them; if the leader was a well-liked one, the sight of him in battle might help direct soldiers among the confusion of the melee, or motivate soldiers to fight harder. Fancy uniforms were usually for display, not combat, but depending on the uniform, they were not exactly useless in combat, either.
There's a reason the "empty battlefield" didn't become a thing until smokeless powder and bolt-action rifles in the late nineteenth century. And even after that, people like Patton still insisted on the value of leading visibly from the front, at all levels down to platoon and squad...an argument that's often been disagreed with on sound grounds, but
never been discredited.