The (later model) Ki-43-II had 12mm plate armor behind the pilot seat, another 12mm plate behind the pilots head rest mounted at a 45 degree angle, and protected fuel tanks. They started manufacturing them with this about halfway through the Ki-43-II run, and then apparently installed the armor in the field on some of the older models. One intercepted JAAF intelligence report states that "after the first clashes between the Ki-43 and RAF Spitfires in Burma mentions that its pilots were pleased with the armour and fuel tank protection in the Type 1 Hayabusa and that one aircraft had returned safely after receiving 39 hits." Some more on this
here.
The armor on Bf 109s, and most WW2 fighters, would work best when being hit directly from behind. Fw 190s also had armor on the wing roots, nose, and some other places, and were unusually strong. But no WW2 aircraft could withstand heavy machine gun bullets beyond a certain point, let alone cannon.
Well that does make it interesting that the British started putting US M2 Browning .50 caliber machine guns into so many Spitfires and other fighters later in the war, replacing the .303s.
The idea that Bf 109s or Fw 190s could survive a .50 cal fighter attack is utter nonsense. I believe that is a WW2 era trope that became popular in the postwar era, similar to a lot of American tropes about "kill ratios" and so on.
As I've pointed out in here before, it didn't take many 12.7mm rounds to blow the wing off, blow the tail stabilizers off, kill the pilot, cut the fuselage tail off, etc. etc. Which you can see in countless gun camera reels and can count in the thousands of Luftwaffe losses inflicted by P-51 and P-47 units all over NE Europe, at least hundreds from defensive gunners on heavy bombers, and hundreds by P-40s in the MTO.
Incidentally IJN and JAAF pilots were trained that most Allied aircraft were vulnerable to hits in the nose area, due to the radiator, and on British and some US planes, to the fuel tank in front of the cockpit. They aimed for the nose by preference.