Protect the Code - Baloney
The premise for the relationship between the American sergeant (N. Cage) and the Navajo codetalker (A. Beach) is that the Marines and Navy could not let a code talker get captured because that would give the Japanese the code. So the white Marine was first a bodyguard but possibly an executioner in the event of imminent capture.
This idea is totally wrong. First of all the windtalkers did not have bodyguards. It was the Japanese American translators and interrogators who needed protecting from American soldiers and Marines who might kill them just for being 'dirty Japs' no matter what uniform they wore. The protection the interpreters got increased the closer they got to the action. In the rear area they had one guard to protect them from harassment. By the time they got right up with an infantry company they got four guards to keep their own side from killing them 'accidentally'.
No one on our side wanted to kill the code talkers so they did not need guards. Capturing a code talker or two would not have helped the Japanese very much. They would have had to train several thousand code-listeners in first the Navaho language. A difficult thing to do, given the no one in Japan knew the Navaho language in the first place. These code listeners having mastered Navaho would then have to learn the code itself plus American radio and fire control procedures. Then the Japanese would have to post these men throughout their own front line units. EVen then, without copies of American military maps, they would not understand the coordinates and locations like landing beaches designated by English language code names (e.g. Red Beach) or the codes for the different units (a regular military code, not part of the Nahaho code).
The upshot is that the code was never in any real danger of being broken and made useless. The code talkers were in personal danger from serving right with the front line soldiers. That danger came from the enemy, not our own side.